パッケージ org.thinkit.common.regex
Provides features to manipulate regular expressions in a more intuitive way.
There are two ways to specify the regular expression pattern to be used, either by call Epitaph#Builder#pattern(String) and directly specifying an arbitrary pattern as string, or by call Epitaphz#Builder#pattern(RegexPattern) specifying it from a preset provided by Epitaph based on egexPattern .
You can also call Epitaph#Builder#option(EnumSet) as optional and specify options set based on RegexOption to be used when parsing with regular expressions.
For regular expression parsing, the find() , lookingAt() and matches() methods are provided. For strings matched in the regular expression parsing process, you can use group() method to get the string within the range of the currently matched index.
Specify the regex pattern as preset:
Epitaph epitaph = Epitaph.builder().pattern(RegexPattern.JAPANESE_ALPHABET).input("test").build();
epitaph.find();
epitaph.lookigAt();
epitaph.matches();
epitaph.group();
Specify the specific regex pattern:
Epitaph epitaph = Epitaph.builder().pattern("[A-Za-z]+").input("test").build();
epitaph.find();
epitaph.lookigAt();
epitaph.matches();
epitaph.group();
- 導入されたバージョン:
- 1.0.0
-
クラスの概要 クラス 説明 Epitaph Provides features to manipulate regular expressions in a more intuitive way.Epitaph.Builder The builder class forEpitaph
.