need a simply preg_match, which will find “c.aspx” (without quotes) in the content if it finds, it will return the whole url. As a example
$content = '<div>[4]<a href="/m/c.aspx?mt=01_9310ba801f1255e02e411d8a7ed53ef95235165ee4fb0226f9644d439c11039f%7c8acc31aea5ad3998&n=783622212">New message</a><br/>';
now it should preg_match “c.aspx” from $content and will give a output as
"/m/c.aspx?mt=01_9310ba801f1255e02e411d8a7ed53ef95235165ee4fb0226f9644d439c11039f%7c8acc31aea5ad3998&n=783622212"
The $content should have more links except “c.aspx”. I don’t want them. I only want all url that have “c.aspx”.
Please let me know how I can do it.
You use DOM to parse HTML, not regex. You can use regex to parse the attribute value though.
Edit: updated example so it checks for c.aspx.