Package no.digipost.text
Class Regex
java.lang.Object
no.digipost.text.Regex
-
Method Summary
Modifier and TypeMethodDescriptionextractGroups(CharSequence text, Pattern pattern) Extract the groups from text which matches the given pattern.Extract the groups from aMatcher, if a match isfound.
-
Method Details
-
extractGroups
Extract the groups from text which matches the given pattern.- Parameters:
text- the text to extract frompattern- The pattern which contains groups to extract.- Returns:
- The extracted groups. If the pattern does not match or does not define
any groups, the empty
streamis returned.
-
groups
Extract the groups from aMatcher, if a match isfound.- Parameters:
matcher- theMatcher.- Returns:
- The extracted groups, or the empty
streamif no match is found or no groups are defined.
-