My regular expression matches the string in the last occurrence of VALUE. How do I tweak my RegEx to match the string only in the first occurrence after a certain string?
Regex: NAME="var1".+VALUE="(.+)"
Text:
<INPUT TYPE="HIDDEN" NAME="var1" VALUE="value that i want to be captured"/><INPUT TYPE="HIDDEN" NAME="var2" VALUE="value2"/><INPUT TYPE="SUBMIT" VALUE="value that is captured, but i don't want to be captured" />
My current RegEx captures the value: "value that is captured, but i don't want to be captured"