>       "/&pg=.*&/"

>But also I think & is a special char (no?) that means "put the matched bit
back", though is that only on the replace side? (my 
question relates strictly to the matching side).


Yes the ampersand is special,  it represents the complete matched string on
the replace.

s/&pg=.*&/\&/

As pointed out the solution is not optimal,  if there is more than two
parameters it will consume them all.   It will also NOT remove a trailing
parameter because the second & is not there.

Ken

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to