[PHP] Regular Expression for Search/Replace

2004-01-16 Thread Tobias Engelhardt
Hi list, i hope someone can help me out... i have to replace a href=order.php?order_id=12345 with a href=order_12345.html any ideas? thank you! Tobias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Tobias Engelhardt
That is not possible because the id's are hard-coded in thousands of html-pages. Not a very good idea, i know. It wasn't mine... I *have* to use search/replace. (A script processes each file in the directory) Brad Pauly wrote: What about just using the variable to build the name? $file_name =

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Tobias Engelhardt
Thanks, that solved the problem... Mike Migurski wrote: i hope someone can help me out... i have to replace a href=order.php?order_id=12345 with a href=order_12345.html any ideas? thank you! PCRE style: '/a href=order.php\?order_id=(\d+)/' replaced by 'a href=order_$1.html'.