Regular expression
| From: | Barry | Date: | Mon, 30 Jan 2006 14:09:03 +0000 |
| Subject: | Regular expression | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-229467@lists.php.net to get a copy of this message | ||
Simple reg help please
i want to match the last "," in "a,b,c,d" and replace it with " and "
i tried ereg_replace(",([a-zA-z])*$"," and ",$string);
but i forgot how to add the "d" which is also matched now back to the
" and "
Can you give any good reg_exp sites where to learn it?
Its long ago since i used reg exp and i lost the hang of it... :(
btw. any sites that have reg_exp that works witht PHP would be fine.
i know http://www.regular-expressions.info/tutorial.html
But that examples dont work with preg_match and ereg.
Thanks ^_^
--
Smileys rule (cX.x)C --o(^_^o)