need some regex help for a regex newb.
If our URL contains
SearchBox.
(SearchBox with the dot on the end) or
SearchBox-Empty
Then, we need to do something. So example matching URLs would be:
http://www.thesite.com/SearchBox.html
or http://www.thesite.com/SearchBox-Empty.html
And a non-matching URL would be:
http://www.thesite.com/SearchBox-Function.html
So, I only want it to be matched when there is not a function being called.
Here is what I have so far:
if((preg_match("@SearchBox\.@",$_SERVER['REQUEST_URI']) || preg_match("@SearchBox\-Empty@",$_SERVER['REQUEST_URI'])) && !empty($_REQUEST['ID']) && is_numeric($_REQUEST['ID'])) {
Thanks for your help!