From a7b3aa343ea3774d105a09132135fdd7f13fdb3f Mon Sep 17 00:00:00 2001 From: "M. Dietrich" Date: Tue, 2 Sep 2014 01:16:33 +0200 Subject: add all whitespaces in regex --- src/eu/siacs/conversations/utils/UIHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index 69f833f2..49645475 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -561,7 +561,7 @@ public class UIHelper { {"\\^\\^", " 😁 ", }, }) { String p = r[0]; - p = "(^" + p + "$|^" + p + " +| +" + p + " +| +" + p + "$)"; + p = "(^" + p + "$|^" + p + "\\s+|\\s+" + p + "\\s+|\\s+" + p + "$)"; body = body.replaceAll(p, r[1]); } body = body.trim(); -- cgit v1.2.3