August 24th, 2013, 11:59 PM
Extract url from action="" using regex
I am trying to develop a plugin for site clicksee.co.uk for multiclicker2. it needs url from action to be retrievd using regex. below is the code from a website
form id="loginform" name="loginform" action="" method="post"
form action="" method="post"
As there is no action in the the from , How can i retrive action url path using regex.
I am using the following regex to retrieve action, but it returns empty.
someone told me that its relative url not absolute url.
Can some one pls help me in this. Thanks
August 25th, 2013, 04:01 AM
I don't really understand your thought process.
You already saw that the action attribute is empty. Yet still you tried to extract something(?) from it -- just to realize that it is in fact empty. Does that surprise you? What did you expect to get from an empty string?
Regexes cannot extract nonexistent characters. An empty string is empty, there's nothing you can do about that.
Yes, an empty action attribute does point to the current URL. So the form target is the same URL you used to access the document.
August 26th, 2013, 01:20 PM
I wanted to get login.php (the page where form sends it data), but u mentioned , that the target will be the same page. i will check it .....