you just need preg_match, which will find "c.aspx" (without quotes) in the content, if it does, it will return the entire URL. As an 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 give the result as
"/m/c.aspx?mt=01_9310ba801f1255e02e411d8a7ed53ef95235165ee4fb0226f9644d439c11039f%7c8acc31aea5ad3998&n=783622212"
$ Content should have more links except "c.aspx". I do not want them. I want the whole url to have "c.aspx".
Please let me know how I can do this.
source share