Regex Woes
I realize this isn't exactly php-specific, but it uses php, so it's sort of related...
Is there any way with preg_match to match anything that isn't a string?
Since I'm being unclear, let me give an example:
I have
If I try to match /<!-- start tag -->(.+)<!--end tag-->/ it'll grab the whole thing, including more blah and bleh, which is bad. and I can't exclude < or >, because they're part of the set I need.
Basically, I need some way to match anything that ISN'T <!-- start tag -->. Using [^<!] doesn't work, because that's a character class. How might I go about this?
Thanks in advance.
Is there any way with preg_match to match anything that isn't a string?
Since I'm being unclear, let me give an example:
I have
<!-- start tag --> blah<b>bolded</b> <!-- end tag --> more blah <!-- start tag --> bleh <!-- end tag -->
If I try to match /<!-- start tag -->(.+)<!--end tag-->/ it'll grab the whole thing, including more blah and bleh, which is bad. and I can't exclude < or >, because they're part of the set I need.
Basically, I need some way to match anything that ISN'T <!-- start tag -->. Using [^<!] doesn't work, because that's a character class. How might I go about this?
Thanks in advance.
