regex for emoticon codes
| From: | Roger Thomas | Date: | Mon, 08 Jul 2002 10:41:54 +0000 |
| Subject: | regex for emoticon codes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-106062@lists.php.net to get a copy of this message | ||
i have something like
$str = "sometext sometext [emoticon01] sometext [emoticon23] sometext";
i would like to use regex to replace those codes into:
sometext sometext /images/emot/01.gif sometext /images/emot/23.gif sometext
all numerics after the code "emoticon" consisted of exactly 2 digits; and they
are in the range from emoticon01 to emoticon30.
i have spent the whole day starring at my crt and reading manpages plus
examples. i achieved nothing but sore eyes.
i would GREATLY-GREATLY appreciate if someone could gimme a code snippet on how
to this sorta thing.
best rgds.
roger
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com