note 41853 added to function.ereg
| From: | john dot obrien at pulplit dot com | Date: | Fri, 23 Apr 2004 17:56:58 +0000 |
| Subject: | note 41853 added to function.ereg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-68684@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/function.ereg.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41853
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41853&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41853&report=yes
Search -- http://master.php.net/manage/user-notes.php