Jump to content

how to preg_match_all with single quotes


cgchris99

Recommended Posts

Need to parse out this piece of code...
-----------------------------------------------------------------
theForm.action = 'Browse.aspx?MyAction=632966656416040865';
        theForm.submit();
-----------------------------------------------------------------
What I need is the number after MyAction. But I can't get my code to work.  It seems to have trouble with either the single quote or the semicolon. Here is what I have coded

preg_match_all("#MyToken=(.*?)/';#s",$page,$myaction);

But this doesn't work.  What do I have wrong?

Thanks for any advice or help.


Link to comment
https://forums.phpfreaks.com/topic/24217-how-to-preg_match_all-with-single-quotes/
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.