I searched high and low, but cannot find a definitive answer to this question. As often happens with regular expressions. So I thought I would ask here.
I am trying to compile a regular expression that I can use in JavaScript to replace all instances of URLs and email addresses (not necessarily be so strict) with anchor tags pointing to them.
Obviously, this something is usually done very simply on the server side, but in this case you need to work with simple text, so an elegant JavaScript solution for executing notes at runtime would be ideal.
The Onl problem, as I said earlier, I have a huge regex as a gaping hole in my skill set :(
I know that one of you has an answer at your fingertips, though :)
source
share