From 15142b57751ee058d9a9db5bfcc3a15408c2290c Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Thu, 1 Dec 2022 15:20:36 +0100 Subject: [PATCH] Add Regex.wildcard() factory method --- .../src/main/java/org/pgpainless/algorithm/Regex.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pgpainless-core/src/main/java/org/pgpainless/algorithm/Regex.java b/pgpainless-core/src/main/java/org/pgpainless/algorithm/Regex.java index 5e23874b..f28bca75 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/algorithm/Regex.java +++ b/pgpainless-core/src/main/java/org/pgpainless/algorithm/Regex.java @@ -25,4 +25,13 @@ public interface Regex { * @return true if matches, false otherwise */ boolean matches(String string); + + static Regex wildcard() { + return new Regex() { + @Override + public boolean matches(String string) { + return true; + } + }; + } }