I don't see the problem with my approach; the match will terminate when it sees the second ampersand, without consuming it.
On 13 July 2010 19:01, Ken Foskey <[email protected]> wrote: > > "/&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 > -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
