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

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -