* and then Marek Kilimajer declared.... > >The html *always* looks like this: > > > ><form method="post" action="http://example.com/someForm.cgi" > >name="user_notification" [some other stuff here]> > > > >This is my attempt to find the correct one so far: > > > >'/action\s*=\s*"([^"]+)".*name\s*=\s*"([^"]+)"/is' > > > >im having trouble putting the 'user_notification' bit in... > > > >This does not work: > > > >'/action\s*=\s*"([^"]+)".*name\s*=user_notification\s*"([^"]+)"/is' > > You missed the quotes around user_notification, and also possible white > chars Right! - this looks better but still not a winner - small testing script: <?php $formString=<<<EOF <html> <head> <arse> <form method="post" action="http://actionurl.php" name="TheWrongForm" /> <form method="post" action="http://theActionUrl.php" name="user_notification" > EOF; preg_match('/action\s*=\s*"([^"]+)".*name\s*=\s*"user_notification"/is', $result, $actionval); print("<pre>"); print("\$resulti\n\n"); print_r($result); print("\$actionval\n\n"); print_r($actionval); print("</pre>"); ?> It produces nothing LoL! thanks again Marek.. -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php