javascript - regex to find url in a text -


I have to find the first URL in the text with regular expressions:

For example:

  I love this website: http: //www.youtube.com/musicIt's fantastic   

or

  [Es] Http: //www.youtube.com/music] text    

you can not Do it completely with a regular expression, you may be interested in it, there is a bit more information about it, but even they look very weak. To capture which cases you will need an extra check outside of your regular expression.

Comments