Exclude punctuation from domain in autolinker regular expression
This commit is contained in:
parent
ab61a7a902
commit
0c738c4f8b
|
@ -361,7 +361,10 @@ class Strings
|
||||||
( # Capture 1: entire matched URL
|
( # Capture 1: entire matched URL
|
||||||
https?:// # http or https protocol
|
https?:// # http or https protocol
|
||||||
(?:
|
(?:
|
||||||
[^/\s.][^/\s]+[.][^\s/]+/? # looks like domain name followed by a slash
|
[^/\s`!()\[\]{};:\'",<>?«»“”‘’.] # Domain can\'t start with a .
|
||||||
|
[^/\s`!()\[\]{};:\'",<>?«»“”‘’]+ # Domain can\'t end with a .
|
||||||
|
\.
|
||||||
|
[^/\s`!()\[\]{};:\'".,<>?«»“”‘’]+/? # Followed by a slash
|
||||||
)
|
)
|
||||||
(?: # One or more:
|
(?: # One or more:
|
||||||
[^\s()<>]+ # Run of non-space, non-()<>
|
[^\s()<>]+ # Run of non-space, non-()<>
|
||||||
|
|
Loading…
Reference in a new issue