I hope this question is not a duplicate but I didn't find anything equivalent on SO.
I want a regex for checking an URL.
The given URL can be local /some-text
or external http://theurl
I am trying ^http://|/[-\w/\.]+$
but it doesn't work.
I don't know how to write the optional http://
. Any help?
Thanks