I need to get the value between href's double quotes(") that matches a specific pattern, I tried the above but I can't figure out what's wrong. When I find the pattern in the same line multiple times I get a huge group with information that I don't want:
href="(/namehere/nane2here/(option1|option2).*)"
I need the group between the parenthesis. This pattern repeats itself a lot of times in the string, they're all in the same line.
Example of a string I'm trying to get the values from:
<div>adasdsda<div>...lots of tags here... <a ... href="/name/name/option1/data1/data2"...anything here ...">src</a>...others HTML text here...<a ... href="/name/name/option2/data1"...