On Saturday 13 April 2002 2:13 am, you wrote: > I have an interactive website, with forums programmed by me. They have > smilies, and I'm trying to make a way for users to be able to type smilies > without them changing to images if they want. I'm trying to make it so if > they type "NOSMILE:)" it will remove the NOSMILE and not display the > smiley. I use "(NOSMILE){0}:)". The smiliey still displays if it has > NOSMILE in front of it. Any ideas?
Hi, I think this should work... <?php $text = 'NOSMILE:)'; if( preg_match('/(NOSMILE){1}(:\)){1}/', $text) ) { echo('NOSMILE:) detected in text'); } ?> Regards, Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php