RegExp question

im trying to wrap my head around regular expressions in js and php. So for a self test i figure id try to remove a html link from a email submission. Getting r rid of everything from <a to a> and everything in between but for some reason no dice.

any one ever do this or know a good way to go about it?