Regex negative lookahead
Posted
by Alyn
on Stack Overflow
See other posts from Stack Overflow
or by Alyn
Published on 2010-04-15T14:36:26Z
Indexed on
2010/04/15
14:53 UTC
Read the original article
Hit count: 326
regex
|negative-lookahead
I need to modify this regex
href=\"(.*)\"
which matches this...
href="./pothole_locator_map.aspx?lang=en-gb&lat=53.153977&lng=-3.533306"
To NOT match this...
href="./pothole_locator_map.aspx?lang=en-gb&lat=53.153977&lng=-3.533306&returnurl=AbandonedVehicles.aspx"
Tried this, but with no luck
href=\"(.*)\"(?!&returnurl=AbandonedVehicles.aspx)
Any help would be much appreciated.
Thanks, Al.
© Stack Overflow or respective owner