I'm trying to pull out a piece of javascript from a loaded web page using a regex command. Here is what the html code looks like. -------------------------------------- more code here blah blah.... function Update() { theForm["updateForm"].value = 'Updating'; theForm.action = 'browse.aspx?myaction=1234567890'; } function LoadImage()........ more code here blah blah ---------------------------------------- Here is how I am trying to find this update routine preg_match_all("#function Update(.*?)function LoadImage#s", $var,$myaction) This fails to produce any matches. I think it is because of the multiple lines. Can anyone help me with this?
I figured it out myself... here is how I changed the code (?s)function Update(.*?)function LoadImage Sorry and thanks anyway.