I'm trying to create a dynamic regex to select URL's based on a segment or the whole URL.
For example, I need to get var.match(/http:\/\/www.something.com\/something/)
The text inside the match()
needs to be converted so that special characters have \
in front of them such for example "\/"
. I was not able to find a function that converts the URL to do this? Is there one?
If not, what characters require a \
in front?