| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | CONSTRUCTOR_ARGUMENT
Matches a valid argument to the constructor. |
| private static final Pattern | ENCLOSED_IN_CURLY_BRACES
Matches text enclosed in curly brackets. |
| private static final Pattern | |
| private static final Pattern | |
| public static final String | |
| private static final Logger | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private final String | |
| private static final String | |
| private final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | RegexFormatter(@NonNull String
the regular expressions for matching and replacing given in the form input)("<regex>", "<replace>").Constructs a new regular expression-based formatter with the given RegEx. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | getDescription()
Implements abstract org. Returns a description of the formatter. |
| public String | getExampleInput()
Implements abstract org. Returns an example input string of the formatter. |
| public String | getKey()
Implements abstract org. Returns a unique key for the formatter that can be used for its identification |
| public String | getName()
Implements abstract org. Returns a human readable name of the formatter usable for e.g. in the GUI |
| private String |
| CONSTRUCTOR_ARGUMENT | back to summary |
|---|---|
| private static final Pattern CONSTRUCTOR_ARGUMENT Matches a valid argument to the constructor. Two capturing groups are used to parse the | |
| ENCLOSED_IN_CURLY_BRACES | back to summary |
|---|---|
| private static final Pattern ENCLOSED_IN_CURLY_BRACES Matches text enclosed in curly brackets. The capturing group is used to prevent part of the input from being replaced. | |
| ESCAPED_CLOSING_CURLY_BRACE | back to summary |
|---|---|
| private static final Pattern ESCAPED_CLOSING_CURLY_BRACE | |
| ESCAPED_OPENING_CURLY_BRACE | back to summary |
|---|---|
| private static final Pattern ESCAPED_OPENING_CURLY_BRACE | |
| KEY | back to summary |
|---|---|
| public static final String KEY | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| PLACEHOLDER_FOR_CLOSING_CURLY_BRACE | back to summary |
|---|---|
| private static final String PLACEHOLDER_FOR_CLOSING_CURLY_BRACE | |
| PLACEHOLDER_FOR_OPENING_CURLY_BRACE | back to summary |
|---|---|
| private static final String PLACEHOLDER_FOR_OPENING_CURLY_BRACE | |
| PLACEHOLDER_FOR_PROTECTED_GROUP | back to summary |
|---|---|
| private static final String PLACEHOLDER_FOR_PROTECTED_GROUP | |
| PLACEHOLDER_FOR_QUOTE_SIGN | back to summary |
|---|---|
| private static final String PLACEHOLDER_FOR_QUOTE_SIGN | |
| regex | back to summary |
|---|---|
| private final String regex | |
| REGEX_CAPTURING_GROUP | back to summary |
|---|---|
| private static final String REGEX_CAPTURING_GROUP | |
| replacement | back to summary |
|---|---|
| private final String replacement | |
| REPLACEMENT_CAPTURING_GROUP | back to summary |
|---|---|
| private static final String REPLACEMENT_CAPTURING_GROUP | |
| RegexFormatter | back to summary |
|---|---|
| public RegexFormatter(@NonNull String input) Constructs a new regular expression-based formatter with the given RegEx. | |
| format | back to summary |
|---|---|
public String format(final @NonNull String input)
| |
| getDescription | back to summary |
|---|---|
| public String getDescription() Implements abstract org. Doc from org. Returns a description of the formatter.
| |
| getExampleInput | back to summary |
|---|---|
| public String getExampleInput() Implements abstract org. Doc from org. Returns an example input string of the formatter. This example is used as input to the formatter to demonstrate its functionality
| |
| getKey | back to summary |
|---|---|
| public String getKey() Implements abstract org. Doc from org. Returns a unique key for the formatter that can be used for its identification
| |
| getName | back to summary |
|---|---|
| public String getName() Implements abstract org. Doc from org. Returns a human readable name of the formatter usable for e.g. in the GUI
| |
| replaceHonoringProtectedGroups | back to summary |
|---|---|
| private String replaceHonoringProtectedGroups(final String input) | |