SedRegExpPattern
public SedRegExpPattern(String regExp)
A "sed -e" like reg exp, of the form:
- /regexp/flags: find and output the matches.
- /regexp/replacement/flags: replace the matches and output the resulting string.
Flags can be left empty or any combinations of the characters 'gidmsux' (g performs a replace all instead of just the first match. For other flags, refer to the Javadoc of Pattern).
It is also possible to chain the output using ';' to perform multiple replacements.
If the regexp contains capturing groups, a find operation would only retain those; for a replace operation, the replacement string can refer to capturing groups with a syntax like '$1'.
- Parameters:
regExp - The regular expression.