RE: regex help

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

 



To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm



> -----Original Message-----
> From: Jason Morehouse
> Sent: 13/01/05 21:06
> 
> I normally can take a bit of regex fun, but not this time.
> 
> Simple enough, in theory... I need to match (count) all of the bold
> tags
> 
> in a string, including ones with embedded styles (or whatever else can
> go in there).  <b> and <b style="color:red">.  My attempts keep
> matching <br> as well.

Just off the top of my head (and untested!), I'd try something like

  /<b(\s+[^>]*)?>/

Cheers!

Mike

-- 
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