Jump to content

Quick Regex Question


rygonet

Recommended Posts

Okay, so I have:

 

<input type="hidden" name="__FIELDPUT" id="__FIELDPUT" value="/abunchofrandomnumbersandvarshere" />

 

How do I put "abunchofrandomnumbersandvarshere" in a variable?

 

Here's what I got so far (by the way, abunchofrandomnumbersandvarshere is random and can be anything).

 

if(preg_match("/id=\"__FIELDPUT\" value=\"(.*)\" /s", $html, $matches)) {
	$viewstate = $matches[1];
}
echo $fieldput;

 

I know this is wrong..

Link to comment
https://forums.phpfreaks.com/topic/50974-quick-regex-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.