I have string as show below. <input type="hidden" name="dsh" id="dsh" value="4965535939321092909" /> HTML: $string = '<input type="hidden" name="dsh" id="dsh" value="4965535939321092909" />'; PHP: you can see value is in second line. I need to extract value field using regex. Any help would be appreciated.
preg_match_all('/<input.*(?:id="([^"]+)").*value="([^"]+)"/Umsi', $string, $matches, PREG_SET_ORDER); PHP: