Hi, I want to extract the following field's value[ie, http://www.example.com from the following example] from a web page: html codes................... <input type="hidden" name="url" value="http://www.example.com"> html codes.................
preg_match('~<input\s+type="hidden"\s+name="url"\s+value="([^"]+)">~', $text, $match); echo $match[1]; PHP: