So, after some help from some lovely folks surfing stackoverflow, I got a regex to remove links that people posted. Now, I think I want to find one that removes their entire post, perhaps with " ", so my form will not allow the post. (instead of hey, check out my site at [LINK REMOVED]. Which is awesome, but could be better if it removed the whole sentence instead of just the link.) I am terrible with regexes atm, so any help would be greatly appreciated!
Here is my current regex:
$a = $_POST['msge'];
$b = preg_replace('%[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)%', '[LINK REMOVED]', $a);
Any ideas?