Regex is hard :)
What I have right now is a string value that I am succesfuly matching values on specific keys. I need to expand my regex to match a using a value rather than a key.
https://www.me.com/?name=bob&identify=bob1&test=email@me.com&validKey=validValue
The current Regex being applied is
((name|identify|test)(=|%3D)[^&]*)
What I want to add/extend is to match any values that contain an @ symbol. I wont know what the 'key' is in as its dynamic so I cant just add 'badKey' into the matched pattern. So an example input for this would be:
https://www.me.com/?name=bob&identify=bob1&test=email@me.com&validKey=validValue&badKey=test2@test.com
Basically I want to match all the existing parts and then also the 'badKey' one. I know I can run the string through a second Regex but for performance sake I would like this to be a single pattern.
Any help here would be appreciated.