Recognize urls without www component.

For more complex regexp, another library might be required.
master
Fabien Freling 2014-12-07 23:14:24 +01:00
parent adcb83ac8f
commit 229932ece4
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ open Str
let is_url url =
let regexp = regexp "\\(https?\\://\\)?www\\..+\\..+" in
let regexp = regexp "\\(https?\\://\\)?\\(www\\.\\)?.+\\..+" in
string_match regexp url 0