Skip to content

Commit

Permalink
add one URL regex
Browse files Browse the repository at this point in the history
  • Loading branch information
zfdang committed Jun 3, 2016
1 parent 93aadff commit 1d22297
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public class Regex {

// https://mathiasbynens.be/demo/url-regex
public static final Pattern Emosol_WEB_URL_PATTERN
= Pattern.compile("(https?|ftp)://(-\\.)?([^\\s/?\\.#-]+\\.?)+(/[^\\s]*)?");
= Pattern.compile("((?:https?:\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\((?:[^\\s()<>]+|(?:\\([^\\s()<>]+\\)))*\\))+(?:\\((?:[^\\s()<>]+|(?:\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?\\xab\\xbb\\u201c\\u201d\\u2018\\u2019]))",
Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);


public static final Pattern Diegoperini_WEB_URL_PATTERN
Expand Down

0 comments on commit 1d22297

Please sign in to comment.