- Version:
- 1.2.0 - 2021-03-26
- Autor:
- hypfvieh
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungextractByRegex(String _input, String _regex) Applies the regular expression to the specified string and returns all values matched by the capturing groups.extractByRegex(String _input, String _regex, int _limitResults) Applies the regular expression to the specified string and returns all values matched by the capturing groups.extractByRegex(String _input, Pattern _pattern, int _limitResults) Applies the regular expression to the specified string and returns all values matched by the capturing groups.static StringextractFirstByRegex(String _input, String _regex) Applies the regular expression to the specified string and returns the value matched by the first capturing group ornull.static StringextractFirstByRegex(String _input, Pattern _pattern) Applies the regular expression to the specified string and returns the value matched by the first capturing group ornull.static booleanregexMatches(String _input, String _regex) Checks if the given regular expression matches the given string.static String[]splitByRegex(String _input, String _regex) Splits the given input string using the given regular expression.static String[]splitByRegex(String _input, String _regex, int _limit) Splits the given input string using the given regex.
-
Methodendetails
-
splitByRegex
Splits the given input string using the given regular expression.Will act like
String.split(String)by first checking if the split is done by a single character. If yes, thenString.split(String)will be called with the given regex. If not, regexPatternwill be used (maybe from cache). If input String isnull, false is returned.- Parameter:
_input- input string_regex- regular expression- Gibt zurück:
- split string as array, maybe null
-
splitByRegex
Splits the given input string using the given regex.Will act like
String.split(String)by first checking if the split is done by a single character. If yes, thenString.split(String)will be called with the given regex. If not, regexPatternwill be used (maybe from cache). If input String isnull, false is returned.The
_limitargument can be used as threshold to limit the returned results. If 0 or less is given, all will be returned.- Parameter:
_input- input string_regex- regular expression_limit- result threshold- Gibt zurück:
- split String as array, maybe null
-
regexMatches
Checks if the given regular expression matches the given string.If input String is
null, false is returned.- Parameter:
_input- input string_regex- regular expression- Gibt zurück:
- true if matching, false otherwise
-
extractByRegex
Applies the regular expression to the specified string and returns all values matched by the capturing groups.- Parameter:
_input- input string_regex- regular expression, required, must contain at least one capturing groups- Gibt zurück:
- list with content of all capturing groups, maybe empty
-
extractByRegex
Applies the regular expression to the specified string and returns all values matched by the capturing groups.If _limitResults is set to 0 or less, all results will be returned, otherwise only the specified amount of results is returned (or less).
- Parameter:
_input- input string_regex- regular expression, required, must contain at least one capturing groups_limitResults- limit the result length- Gibt zurück:
- list with content of all capturing groups, maybe empty
-
extractByRegex
Applies the regular expression to the specified string and returns all values matched by the capturing groups.If _limitResults is set to 0 or less, all results will be returned, otherwise only the specified amount of results is returned (or less).
- Parameter:
_input- input string_pattern- regular expression pattern, required, must contain at least one capturing groups_limitResults- limit the result length- Gibt zurück:
- list with content of all capturing groups, maybe empty
-
extractFirstByRegex
Applies the regular expression to the specified string and returns the value matched by the first capturing group ornull.- Parameter:
_input- input string_regex- regular expression, required, must contain at least one capturing groups- Gibt zurück:
- value matched by first capturing group
-
extractFirstByRegex
Applies the regular expression to the specified string and returns the value matched by the first capturing group ornull.- Parameter:
_input- pattern_pattern- regular expression pattern, required, must contain at least one capturing groups- Gibt zurück:
- value matched by first capturing group
-