in reply to Re: Help constructing a regex that also matches hyphens and parentheses
in thread Help constructing a regex that also matches hyphens and parentheses
Very wrong. The regexp you posted is neither zero-width, nor positive, nor useful. [^<\/td>]* means "Any number of characters other than <, /, t and d." It wouldn't match asdf, for example, since it contains d.
I think you meant the zero-width negative lookahead and its common usage: (?:(?!<\/td>).)* That means "Any number of characters which don't contains the sequence </td>."
((?:(?!<\/td>).)*)<\/td>
is very similar to
(.*?)<\/td>
but it's possible for the latter to capture much more than anticipated in some circumstances.
|
|---|