From 7d0ac17879149574a75c80be807c0819f09f7b7f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 21 Sep 2024 19:21:37 +0300 Subject: URL regex: exclude guillemets --- src/main/java/com/juick/util/MessageUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/util/MessageUtils.java b/src/main/java/com/juick/util/MessageUtils.java index 316adb90..3c8001d8 100644 --- a/src/main/java/com/juick/util/MessageUtils.java +++ b/src/main/java/com/juick/util/MessageUtils.java @@ -57,7 +57,7 @@ public class MessageUtils { private final static String urlWhiteSpacePrefix = "((?<=\\s)|(?<=\\A))"; - private final static String urlRegex = "((?:(?:ht|f)tps?://(?:www\\.)?([^\\s()<>/?#]+)([^\\s()<>]*)?))"; + private final static String urlRegex = "((?:(?:ht|f)tps?://(?:www\\.)?([^\\s()<>/?#]+)([^\\s()<>«»]*)?))"; private final static String urlWithWhitespacesRegex = urlWhiteSpacePrefix + urlRegex; -- cgit v1.2.3