as I cant find exact answer to my question I decided to ask for help posting my question here. So, I have a page content which I get with file_get_contents and want to preg_match this url:
http://sample.com/Last/LastSearch.ashx?q=cnt=1&day=5&keyword=sample&location=15&view=v
from
<a href="javascript:LastURL('http://sample.com/Last/LastSearch.ashx?q=cnt=1&day=5&keyword=sample&location=15&view=v');" id="Last" rel="nofollow" class="Last" onclick="javascript:hideCss('LastCSS');hideCss('FirstRCSS');">Last</a>
Please help me.
Why not use the DOM? That’s what it’s for…
If you insist on a regex, try (in PHP)
or (in JavaScript)