From 2b2f444c4420aa819e30428aff88c8908f7a8f4a Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Mon, 28 Feb 2022 17:30:12 +0100 Subject: [PATCH] Fixed URL checker with http prefix mandatory. --- src/fr/devinsy/statoolinfos/checker/PropertyChecker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java b/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java index a183fcb..b37b5c9 100644 --- a/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java +++ b/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Christian Pierre MOMON + * Copyright (C) 2020-2022 Christian Pierre MOMON * * This file is part of StatoolInfos, simple service statistics tool. * @@ -41,7 +41,7 @@ public class PropertyChecker public static final String STRING = "^.+$"; public static final String DATETIME = "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}([\\.,]\\d+)?)?([+-]\\d\\d:\\d\\d)?"; public static final String DATE = "^(\\d{4}-\\d{2}-\\d{2}|\\d{2}/\\d{2}/\\d{4}|\\d{2}/\\d{4})"; - public static final String URL = "^(http(s)?://)?[\\w-_\\.]+(\\.\\w+)+(:\\d+)?(/.*)?$"; + public static final String URL = "^https?://[\\w-_\\.]+(\\.\\w+)+(:\\d+)?(/.*)?$"; public static final String EMAIL = "^.*@.*$"; public static final String NUMERIC = "^\\d+$"; public static final String NUMERICS = "^\\d*(,\\d*)*$";