- match Pcre.split ~rex:blanks_RE prefix with
- | [uri_prefix; url_prefix] -> (uri_prefix, url_prefix) :: acc
- | _ ->
- Http_getter_logger.log ("skipping invalid prefix: " ^ prefix);
- acc)
+ let subs = Pcre.extract ~rex:prefix_RE prefix in
+ try
+ (subs.(1), subs.(2)) :: acc
+ with Invalid_argument _ ->
+ Http_getter_logger.log ("skipping invalid prefix: " ^ prefix);
+ acc)