Class RegexTemplateHelper
java.lang.Object
org.mockserver.templates.engine.helpers.RegexTemplateHelper
Regular expression helpers for templates: test for a match, replace all
matches, and extract a capture group from the first match.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the given capture group from the first match of the pattern in the input, or an empty string if there is no match or the group is absent.booleanReturnstrueif the pattern is found anywhere within the input.replaceAll(String input, String pattern, String replacement) Replaces every match of the pattern in the input with the replacement.toString()
-
Constructor Details
-
RegexTemplateHelper
public RegexTemplateHelper()
-
-
Method Details
-
matches
Returnstrueif the pattern is found anywhere within the input. -
replaceAll
Replaces every match of the pattern in the input with the replacement. -
group
Returns the given capture group from the first match of the pattern in the input, or an empty string if there is no match or the group is absent. Group0is the entire match. -
toString
-