in reply to Help with reg expressions
take the folowing line for example,[^-]+
what do you think his regex will match ... think carefully--it matches the whole line. I recomend reading the book by Jeff Freidel (sp?) called Mastering Regular Expressions. In it, he stresses to say what you really mean. You should replace this line:<img src="this.gif"><img src="something-disclose.gif">
with this:[^-]+
The reason is that ^- means anything but a dash, well the > sign isn't a dash, so his regex will match that, all the way to the first -, witch could be in another image tag on the same line.[^->]
|
|---|