hey, this is whats going on... i have a string:

word1 word2 word3 word4 etc


and i have a word, lets say %word, what i'm trying to do, with regex is see if %word = word3 in my string

so far i have


//echo -a $regex(this word heading some ifno,/(\s.*){2}heading\s.*/gi)

which echos 1, however it also echo's 1 if there are more words between "this" and "heading", sorry i have been away for a while and am not quite back in the swing of things with regular expression, thanks for your help


note: i would need it to match regardless if the first tow words are digits or not, trying to get it to match like this:

starts with any two words digits or otherwize, third word is the one i want to compare, followed by one or more words, digits or otherwize

example:

1 10.00 matchtext more words


so prolly something like \w\wmatchtext\w

Last edited by NightChillz; 14/07/07 10:03 PM.