I need to match this and extract the value from these tags. Problem is they are generated dynamically and someone decided to switch things up each time the page is refreshed.
So the tag could be this:
<input type="hidden" value="838218230" name="vstablepid_2717_1State">
or this:
<input type="hidden" name="vstablepid_2717_1State" value="838218230" >
I can do each one separately, with something like this:
value="(.+?)".*"vstable
Is there one statement that can to both?
Ideas so far:
Using some type of optional syntax i could say find the ‘vstable’ match either before or after the value – but I still need to find at least one ‘vstable’ on the line.
Use a look ahead to assert
vstable, then grab your content (from the group):The look-ahead part of the regex
(?=...)is requiring thatvstableappear before the next>