Recognize urls without www component.
For more complex regexp, another library might be required.
This commit is contained in:
parent
adcb83ac8f
commit
229932ece4
|
@ -2,7 +2,7 @@ open Str
|
||||||
|
|
||||||
|
|
||||||
let is_url url =
|
let is_url url =
|
||||||
let regexp = regexp "\\(https?\\://\\)?www\\..+\\..+" in
|
let regexp = regexp "\\(https?\\://\\)?\\(www\\.\\)?.+\\..+" in
|
||||||
string_match regexp url 0
|
string_match regexp url 0
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue