I've got the following regex that was working perfectly until a new situation arose
^.*[?&]U(?:RL)?=(?<URL>.*)$
Basically, it's used against URLs, to grab EVERYTHING after the U=, or URL= and return it in the URL match
So, for the following
http://localhost?a=b&u=http://otherhost?foo=bar
URL = http://otherhost?foo=bar
Unfortunately an odd case came up
http://localhost?a=b&u=http://otherhost?foo=bar&url=http://someotherhost
Ideally, I want URL to be "http://otherhost?foo=bar&url=http://someotherhost", instead, it is just "http://someotherhost"
EDIT: I think this fixed it...though it's not pretty
^.*[?&](?<![?&]U(?:RL)?=.*)U(?:RL)?=(?<URL>.*)$