I would like to know using either regex or xpath how can you scrape a form id value from a html page that has the same form_id names example below, I would to scrape the value from the 2nd form_id name any advice for the best way to achieve this using only regex or xpath? Thanks
<input type="hidden" name="form_id" value="search_block_form" />
<input type="hidden" name="form_id" value="webform_client_form_" />
Targeting second input with XPath:
Using utilities that work on DOM structure is the preferable choice here.