Do you have a question? Post it now! No Registration Necessary. Now with pictures!
March 1, 2007, 10:12 pm
rate this thread
I was reading through someone else s code earlier and I came across
$regex = '%src="(?!http://)%';
I cant figure out what it does. The ? is a greedy quantifier is it not
and should be after http://............. or is that rubbish
And what does the ! do . Cant find anything info about that.
any help would be appreciated
Re: More Regex
The ? is used in many places for many different things. In combination
with a ! like in this case it's called a negative lookahead assertion.
So the regex above matches all src=", that are not followed by http://.