If you're worried about text messages, you should be encoding to HTML entities any strange characters, in the first place. E.g., save the message to the database (unless it's judged to be too long or there's some other reasonable objection to prevent form submission), and when you go to display it, make use of HTML::Entities. (This ignored any long-line issues, which you can solve by inserting spaces or soft hypens).
In reply to Re: a regex
by Anonymous Monk
in thread a regex
by toniax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |