in reply to Need help with regex/strategy

Hmmm... This not work for this (it must find logon string):

https://www.simplydomains.co.nz/logon/ref="><script>alert(1);</script>

Replies are listed 'Best First'.
Re^2: Need help with regex/strategy
by moritz (Cardinal) on Nov 16, 2009 at 09:44 UTC
    (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]