I'm using the following to try and replace urls in my html output:

$newhrefs = preg_replace("/script.php\?(.*)=(.*)&(.*)=(.*)&(.*)=(.*)/",
"script-$1-$2-$3-$4-$5-$6.html", $hrefs);

This works fine as long as there are exactly 3 var=val pairs... not 1 or 2
or 4 or more...

How can I write my expression to match 1 or more pairs???  For example:

script.php?var=val
script.php?var=val&var2=val2
script.php?var=val&var2=val2&var3=val3
etc...etc...etc...

TIA,
Shawn



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to