preg_match_all for dummies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am a regex retard.

I am trying to pull keywords out of this crazy bbcode-like file, but only for bbcode-like code NOT enclosed in HTML comments. I currently have managed to create this regex:

'/(?<!<!--)\[!(\w+)::.*!\](?!-->)/U'

Which matches

[!keyword::crazy bbcode!]

and not

<!--[!keyword::crazy bbcode!]-->

That's a step in the right direction. But it includes in the match keywords within phrases like this:

<!-- A sentence including some [!keyword::crazy bbcode!]. -->

I want to ignore all bbcode within HTML quotes.  How do I do this?


thanks

kgt

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux