I am looking for a regex to extract URL params. My current solution is this:
(?i)key(?-i)=([^&]+)
but it fails on some of the tests below.
Lines where I want to match
cool=13&nice=zz&key=value&polo=0
Key=value&cool=13&nice=zz&polo=0
cool=13&nice=zz&polo=0&key=value
Lines I don't want to match it
cool=13&nice=zz&myKey=value&polo=0
(?<=&|^)(?i)key(?-i)=[^&]*