From 229932ece494127a8ea357a9cc765dfa8f4e21ca Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Sun, 7 Dec 2014 23:14:24 +0100 Subject: [PATCH] Recognize urls without www component. For more complex regexp, another library might be required. --- ocaml/evaluate.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml/evaluate.ml b/ocaml/evaluate.ml index e4e8046..c561401 100644 --- a/ocaml/evaluate.ml +++ b/ocaml/evaluate.ml @@ -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