I'm trying to do graphical smileys for my guestbook, but I've run into a problem with the crying smilies:

I need to replace :'( and :'-( ... or as they look in the post after being entered through htmlentities with ent_quotes on:

:'(
:'-(

this causes the entire message to disappear:

$text = ereg_replace(':&#039;-?(','<img src="'.$smiley_path.'/crying.gif" alt=":&#039;(" width="25" height="15" align="absmiddle">',$text);

only the format of the search part differs from my other smiley replacements, so obviously that's where the problem is ... afaik, neither &, # or ; have any meaning in regex, so I don't get what causes it ... I've tried escaping all of those chars, and it still causes $text to come back empty...

any ideas will be highly appreciated...


TIA


Rene
--
Rene Brehmer
aka Metalbunny

~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to