Re: regular expressions

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

 



Get "Sams, Teach yourself Regular Expressions" It's a great little, simple book.

Then get the Regex Coach. Google to find it. It's free, works great and is super for learning regex



Børge Holen wrote:
Ok I seem to need to learn regular expressions more than anything.

this is what im working on:

["desc"] = " <c> FFFFFF topic <c> 999999 rest of the text ",

$string = preg_replace("/<c>\s\w[0-9A-F]+/","",$string);

prints out: topic rest of the text ( with double spaces :(, I thought \s would fix that )

however how would I go on this:
<font color="colorcode">topic</font>
<font color="colorcode">rest of thetext</font>

Almost anything I do with the above statement either throws me off with a modifier error or prints out what it should not


---
Børge
Kennel Arivene http://www.arivene.net
---

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