preg_replace (again)

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

 



Hi group,

 

I know I am a little bit stupid when it comes to actually figuring out how
to use the preg_match and preg_replace. This is what I am facing:

 

A string like this: This is some _color:pink_ colored text _color_ that I
want to transfer

 

Should convert to: This is some <font color="pink">colored text</font> that
I want to transfer

 

Anyone who see a simple solution to this? Right now I have created an ugly
script that do the same thing, but I want to start to learn and use
preg_match.

 

Thanks.

 

/Peter

 

www.lauri.se <http://www.lauri.se/>  - Personal web site

www.dwsasia.com <http://www.dwsasia.com/>  - Company web site 

 

 

 


[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