detail with a form to take action address didnt warp with qu

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

Moderator: General Moderators

Post Reply
User avatar
visonardo
Forum Contributor
Posts: 136
Joined: Mon Oct 02, 2006 7:49 pm
Location: Argentina, South America´s Sun.

detail with a form to take action address didnt warp with qu

Post by visonardo »

this is my regex code to take action address from a form

<(form)(\s)[^>]*action=[\"']?(\S)+[\"']?[^>]*>

the problem is that i found some from thus (google case) <form action=/search name=f> :o :o

the problem is that dont have quotes, and if i left the "?" like i shown in my regex it can confuce with others because if the first part didnt has quotes the end of that can. How can i say that if appear at the begining finish with that too? and other thing.. this regex that i was testing

<(form)(\s)[^>]*action=(\S)+[^>]*>

didnt work noone, i dont know how to take the address of action from a form that have this address without quotes. How would it be?

Before all, Thank you by read that.
User avatar
visonardo
Forum Contributor
Posts: 136
Joined: Mon Oct 02, 2006 7:49 pm
Location: Argentina, South America´s Sun.

Post by visonardo »

fixed, puting (\s)+ between ( and )
Post Reply