Please improve this regex to detect the unicode link:
http(news|http|ftp|https):\/\/[\w\-_]+(\.[\w]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?
Finding a Unicode URL
Finding a Unicode URL
Last edited by Debugger on Sat Oct 20, 2018 9:35 am, edited 1 time in total.
Re: Finding a Unicode URL
Please try searching for:
(news|http|ftp|https):\/\/.*[^\x00-\x7f]
(news|http|ftp|https) = match news, http, ftp or https
: = match a literal :
\/ = match a literal /
.* = match any character, any number of times
[^\x00-\x7f] = match a non-ASCII character.
(news|http|ftp|https):\/\/.*[^\x00-\x7f]
(news|http|ftp|https) = match news, http, ftp or https
: = match a literal :
\/ = match a literal /
.* = match any character, any number of times
[^\x00-\x7f] = match a non-ASCII character.
Re: Finding a Unicode URL
Thanks, it works, but I want to search in both cases(in all matches), Unicode and without Unicode.