Thanks Jamie (and others),

That works a treat.

I would have tried

/&pg=*[^&]/

which of course would have matched all &ampersands up until the last taking out 
more than one argument.
I don't really understand how the [^&] followed by the * works but it does.

Thanks

Pete

P.S I didn't understand Lindsay's question about doing the replace. I'm replacing the arg with nothing, I.E I just want to remove the "pg=" argument from the string.



Jamie Wilkinson wrote:
Try:

/&pg=[^&]*/

match zero or more of the character class that is not an ampersand.
--
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