0

Html

  <input data-binding="GID" data-source="Person" data-val="False" data-val-required="The GID field is required." id="GID" name="GID" type="hidden" value="502fd4a3-1a3e-4219-a16e-8c8be295771e" />

I am using following Regular expression to extract this GID :

input name="GID" type="hidden" value="([^"]+?)" 

But this seems not working and I am getting Default value always.

Helping Hands
  • 5,292
  • 9
  • 60
  • 127

1 Answers1

1

Using regular expressions for parsing HTML is not the best idea, I would rather suggest going for CSS Selector Extractor instead, example configuration:

enter image description here

If you still want/need to go for regular expressions consider amending your regex as:

input.*name="GID" type="hidden" value="([^"]+?)" 

enter image description here

as there are some other HTML tags between input and name="GID" and you need to use wildcard to match them as well

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • You are right, I missed other html tags which are in between and did not know even about using wildcard in this case. It helps. – Helping Hands Sep 07 '20 at 10:21