note 41853 rejected from function.ereg by vincent
| From: | vincent@php.net | Date: | Fri, 23 Apr 2004 19:00:02 +0000 |
| Subject: | note 41853 rejected from function.ereg by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68688@lists.php.net to get a copy of this message | ||
Note Submitter: john.obrien@pulplit.com
----
Hi-
I'm a newbie whose been trying to understand regular expressions.
What I'd like to do is be able to replace the text
'<ASIN="1234578923">This Is a Book</ASIN>'
with the text
<a herf="http://www.amazon.com
/exec/obidos/ASIN/1234578923/referral-ID">This Is a Book</a>.
I think I've figured out how to replace the <ASIN=" with the <a href="http://www.amazon.com/exec/obidos/ASIN/"
- however, I can't figure out how to then tag something onto the end of it. I've been
trying to use ereg_replace... Is that the right approach?
Any help would be much appreciated,
Regards,
John O'Brien
______________
www.PulpLit.com
read something different