public static class AntTask.SubstituteElement extends AntTask.Element_path
flags
Constructor and Description |
---|
SubstituteElement() |
Modifier and Type | Method and Description |
---|---|
void |
addConfiguredRegex(AntTask.TextElement subelement)
The regular expression the defines a match.
|
void |
addConfiguredReplacement(AntTask.TextElement subelement)
The "replacement string" that determines how each match is replaced.
|
String |
getRegex()
Getter for the mandatory 'regex' attribute or subelement.
|
String |
getReplacement()
Getter for the mandatory
replacement=... attribute or <replacement> subelement. |
void |
setCondition(String expression)
Configures a condition that must evaluate to
true before each occurrence is replaced. |
void |
setInputEncoding(String charset)
The encoding of the transformation input; defaults to the platform default encoding.
|
void |
setOutputEncoding(String charset)
The encoding of the transformation output; defaults to the platform default encoding.
|
void |
setRegex(String regex)
The regular expression the defines a match.
|
void |
setReplacement(String replacement)
The "replacement" that determines how each match is replaced.
|
setName, setPath
public void setInputEncoding(String charset)
public void setOutputEncoding(String charset)
public void setRegex(String regex)
For the precise description of the supported regular-expression constructs, see here.
public void addConfiguredRegex(AntTask.TextElement subelement)
For the precise description of the supported regular-expression constructs, see here.
public String getRegex()
public void setReplacement(String replacement)
For the precise description of the format, see here.
public void addConfiguredReplacement(AntTask.TextElement subelement)
For the precise description of the format, see here.
public String getReplacement()
replacement=...
attribute or <replacement>
subelement.public void setCondition(String expression) throws de.unkrig.commons.text.parser.ParseException
true
before each occurrence is replaced.
The following variables are available in the expression:
path
match
occurrence
de.unkrig.commons.text.parser.ParseException
Copyright © 2022 Arno Unkrig. All rights reserved.