I am trying to create a mod_rewrite rule to remap some friendly Web addresses for searches, and my regex-fu is not so good...hehe.
Essentially, within the URL, following the subdomain, you will see a flexible quantity of words (w), separated with a character (say +). A clear expression is permitted (i.e. "foo.bar.com"), after which next, something similar to "foo.bar.com/wild birds", or "foo.bar.com/wild birds+felines+fishes").
Out of this, we have to go ahead and take words, and pass them as query strings. Exactly how can you start separating an arbitary quantity of matches, after which passing them onto our PHP page? Now, when the separator only agreed to be "+", well, we're able to just pass this on in general discrete chunk towards the page, as that utilizes + as it is separator character anyway. However, I am curious - whether it wasn't, how does one split up? Is it feasible with only a mod_rewrite rule? Or would make use of another thing?
As lengthy as the separators are non-alpha figures you can simply do greedy matching for
([A-Za-z]+)* (essentially exactly the same factor as
(\w+)*), which should internet you groups of all of the words split up by other figures among.