Cheers all...
I need to strip out urls in a paragraph of text. The paragraph comes to my code from a db call, so it is dynamic. I can get the first url out but not all of them if there is more than one. I was hoping someone has tackled this and can help me out.
I have $deptDesc coming in from the db.
$deptDesc = preg_replace('/<a href=.*>/U', '',$deptDesc);
$deptDesc = preg_replace('/<\/a>/', '',$deptDesc);
I added the 'U' for non-greedy but it only seems to get the first url if there is more than one.
any thoughts?
Thanks for any help.