Forum Moderators: coopster

Message Too Old, No Replies

Preg_replace

a guide

         

WhosAWhata

3:55 am on May 15, 2004 (gmt 0)

10+ Year Member



i'm working on a site that will allow message posting (by administrators only) and wish to have something similar to the Style Codes tool to the left. I realize that the best way to accomplish this is by using preg_replace to turn things like this.jpg into <img src="pics/this.jpg">

i was hoping someone would post a link to a tutorial on the structure of the preg_replace search functions all of the /,\,{,},[,] etc... i didn't find the php.net to be as helpful as one would hope

thanks

Timotheos

4:53 am on May 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I understand you might want to do it on your own but there is the PEAR HTML to BBCode parser class [pear.php.net] that does it.

WhosAWhata

5:51 pm on May 15, 2004 (gmt 0)

10+ Year Member



thats great thanks!
i am still interested though in learning for future experience...