some regular expression stuff to find links