public class PatternTemplate extends Object
$
g will be substituted by capture group g in a match result. A
dollar sign or numeral literal immediately following a capture group reference may be
included as a literal in the template by preceding it with a backslash (\
).
Backslash itself must be also escaped in this manner.Constructor and Description |
---|
PatternTemplate(String value)
Constructs a new template with the specified value.
|
Modifier and Type | Method and Description |
---|---|
String |
applyTo(MatchResult result)
Performs a transformation of a match result by applying the template.
|
String |
toString()
Returns the literal template value.
|
public PatternTemplate(String value)
value
- the template to apply to regular expression pattern matches.public String applyTo(MatchResult result)
""
) value.result
- the match result to apply the template to.Copyright © 2025 Open Identity Platform Community. All rights reserved.