java.lang.Object
io.cucumber.cucumberexpressions.RegexpUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final boolean[]List of characters to be escaped. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static StringescapeRegex(String text) Escapes the regexp characters (the ones from "^$(){}[].+*?\") from the given text, so that they are not considered as regexp characters.
-
Field Details
-
CHAR_TO_ESCAPE
private static final boolean[] CHAR_TO_ESCAPEList of characters to be escaped. The last char is '}' with index 125, so we need only 126 characters.
-
-
Constructor Details
-
RegexpUtils
private RegexpUtils()
-
-
Method Details
-
escapeRegex
Escapes the regexp characters (the ones from "^$(){}[].+*?\") from the given text, so that they are not considered as regexp characters.- Parameters:
text- the non-null input text- Returns:
- the input text with escaped regexp characters
-