2 // This software is now distributed according to
3 // the Lesser Gnu Public License. Please see
4 // http://www.gnu.org/copyleft/lesser.txt for
8 package com.stevesoft.pat;
11 * This class implements user defined special replacement rules of the form
13 * href="http://javaregex.com/code/trans2.java.html">trans2.java</a> and <a
14 * href="http://javaregex.com/code/trans2a.java.html">trans2a.java</a>.
16 public class ChangeRule extends SpecialRule
20 public ChangeRule(ChangeRule c)
25 public ChangeRule(String nm, Regex rr)
31 public ChangeRule(String nm, Transformer tr)
37 public Object clone1()
39 return new ChangeRule(this);
42 public String toString1()
44 return "${=" + name + "}";
47 public void apply(StringBufferLike sb, RegRes rr)