Class RegexUtilitiesKt
-
- All Implemented Interfaces:
public final class RegexUtilitiesKt
-
-
Method Summary
Modifier and Type Method Description final static BooleanmatchAll(List<Regex> $self, String string)match the given string against all regular expressions in this list. final static RegextoDotEscapedRegex(String $self)Turn this string into a regex in which every .matches a literal dot instead of any character.-
-
Method Detail
-
matchAll
final static Boolean matchAll(List<Regex> $self, String string)
match the given string against all regular expressions in this list.
- Returns:
true if any match was found, false otherwise.
-
toDotEscapedRegex
final static Regex toDotEscapedRegex(String $self)
Turn this string into a regex in which every
.matches a literal dot instead of any character.Intended for building patterns out of dotted version numbers, where an unescaped
.silently makes a pattern too permissive —1.21would otherwise also match1x21.- Returns:
This string as a Regex, with every dot escaped.
-
-
-
-