PHP Regular Expression Help

Link_trader

New Member
I'm working on a project right now that is a shoutbox. Since I have disabled all HTML as people would most likely forget to close a tag ans screw up everything, I wanted to make a different form of adding some flair for people to use in their posts. What I want to to is setup a regular expression in PHP to add tags around text. Here is an example of what I want to do... If a person types "[Hello!] How is {everyone}?" it would display as such...
"Hello! How is everyone?" The text in between the [ ] brackets would become bold and the text in between the { } brackets would be italics. Does anyone know how to write a regular expression for this?
Thanks!
 
Back
Top