Today someone over at the House of Fusion mailing list asked how to parse out search terms from an incoming referrer link. Several people responded with options of looping over the referrer, and other suggestions. Then I put forth the idea of using a simple regex to extract the required string. Here's what I came up with, maybe it'll help you?
User Greg Morphis asked a question today over on the House of Fusion mailing list.
I've noticed over the past few months quite a few developers with little to no knowledge of regular expressions (regex from here on out). For whatever reason they haven't taken the time, or had the chance, to learn what I consider to be one of the most powerful, and useful tools available in programming. Even knowing a few basics can really streamline your workflow, and improve your code. Not only are they useful IN code, but they can even help you write code. In this post I'm going to cover some regex basics, then show you some real examples of how they can solve problems for you.