in reply to Re: Need help with regex/strategy
in thread Need help with regex/strategy

(assuming you meant to reply to my reply...)

You are right; but that's easily fixed by generalizing the first step a bit: split on either question mark or equality sign, (split /[?=]/, $url, 2)[0]