Package org.apache.juneau.svl.vars
Class PatternExtractVar
java.lang.Object
org.apache.juneau.svl.Var
org.apache.juneau.svl.SimpleVar
org.apache.juneau.svl.MultipartVar
org.apache.juneau.svl.vars.PatternExtractVar
A transformational variable that returns matched regex groups by given index.
The format for this var:
"$PE{arg,pattern,groupIndex}"
The pattern can be any string optionally containing
Example:
Since this is a MultipartVar
, any variables contained in the result will be recursively resolved.
Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolve
(VarResolverSession session, String[] args) The interface that needs to be implemented for this interface.Methods inherited from class org.apache.juneau.svl.MultipartVar
resolve
Methods inherited from class org.apache.juneau.svl.Var
allowNested, allowRecurse, canResolve, doResolve, getName
-
Field Details
-
NAME
The name of this variable.- See Also:
-
-
Constructor Details
-
PatternExtractVar
public PatternExtractVar()Constructor.
-
-
Method Details
-
resolve
Description copied from class:MultipartVar
The interface that needs to be implemented for this interface.- Specified by:
resolve
in classMultipartVar
- Parameters:
session
- The session object used for a single instance of a string resolution.args
- The arguments inside the variable.- Returns:
- The resolved variable.
-