regex - RegularExpression to find uppercase links -


i'm using regex below find links in text. links written in caps not found. (e.g. http://www.example.com) need change?

var getlink:regexp = /((https?:\/\/|www\.)[äöüÄÖÜa-za-z0-9\-\:\/]{1,}+\.[\*\!\'\(\)\;\:\@\&\=\$\,\?\#\%\[\]\~\-\+\_äöüÄÖÜa-za-z0-9\/\.]{2,}+)/g 

you can ignore case adding entire thing case insensitive:

/((https?:\/\/|www\.)[äöüa-z0-9\-\:\/]{1,}+\.[\*\!\'\(\)\;\:\@\&\=\$\,\?\#\%\[\]\~\-\+\_äöüa-z0-9\/\.]{2,}+)/gi

notice i flag @ end. removed capital letter patterns since no longer needed.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -