Exception in pattern

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
Lolo Irie
Forum Newbie
Posts: 2
Joined: Wed Feb 13, 2008 3:13 am

Exception in pattern

Post by Lolo Irie »

Hello everyone and sorry for my poor english. Hope you will understand my request...

In a HTML page, I would like to amend all forms, excepts forms using the GET method...

I've tried many codes (like following), but it never works. I'm really not a an expert with regexp... :(

$pattern = '/<form(.*)(?!method=(\'|")get(\'|"))/';

Thanks for any help !!!
Lolo Irie
Forum Newbie
Posts: 2
Joined: Wed Feb 13, 2008 3:13 am

Re: Exception in pattern

Post by Lolo Irie »

I continue to search and found the following pattern, it does exactly what I do not want... Parsing all GET forms...
maybe it help you to figure what I'm searching... ;)

$pattern = '/<form(.*)(?=(method=(\'|")get(\'|")))/';
Post Reply