cleanup
This commit is contained in:
parent
cab2bc4452
commit
fbfa3d0da2
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ defmodule AutoLinker.Parser do
|
|||
# @invalid_url ~r/\.\.+/
|
||||
@invalid_url ~r/(\.\.+)|(^(\d+\.){1,2}\d+$)/
|
||||
|
||||
@match_url ~r{^[\w\.-]+(?<tld>\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$}
|
||||
@match_url ~r{^[\w\.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$}
|
||||
@match_scheme ~r{^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$}
|
||||
|
||||
@match_phone ~r"((?:x\d{2,7})|(?:(?:\+?1\s?(?:[.-]\s?)?)?(?:\(\s?(?:[2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s?\)|(?:[2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s?(?:[.-]\s?)?)(?:[2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s?(?:[.-]\s?)?(?:[0-9]{4}))"
|
||||
|
|
Loading…
Reference in a new issue