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
Post a Comment