public class RegexpChunkRule
extends java.lang.Object
Constructor and Description |
---|
RegexpChunkRule(Regex regexp,
java.lang.String repl,
java.lang.String descr)
Construct a new RegexpChunkRule.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(ChunkString chunkstr)
Apply this rule to the given
ChunkString . |
java.lang.String |
toString() |
public RegexpChunkRule(Regex regexp, java.lang.String repl, java.lang.String descr)
regexp:
- The regular expression for this ``RegexpChunkRule``.
When this rule is applied to a ``ChunkString``, any
substring that matches ``regexp`` will be replaced using
the replacement string ``repl``. Note that this must be a
normal regular expression, not a tag pattern.repl:
- The replacement expression for this ``RegexpChunkRule``.
When this rule is applied to a ``ChunkString``, any substring
that matches ``regexp`` will be replaced using ``repl``.descr:
- A short description of the purpose and/or effect
of this rule.public void apply(ChunkString chunkstr)
ChunkString
. See the
class reference documentation for a description of what it
means to apply a rule.chunkstr
- The ChunkString
to which this rule is applied.public java.lang.String toString()
toString
in class java.lang.Object