2 // This software is now distributed according to
\r
3 // the Lesser Gnu Public License. Please see
\r
4 // http://www.gnu.org/copyleft/lesser.txt for
\r
6 // -- Happy Computing!
\r
8 package com.stevesoft.pat;
\r
10 /** This implements the $& element of the second argument to
\r
12 * @see com.stevesoft.pat.ReplaceRule
\r
14 public final class AmpersandRule extends ReplaceRule {
\r
15 public AmpersandRule() {}
\r
16 public void apply(StringBufferLike sb,RegRes res) {
\r
17 sb.append(res.stringMatched());
\r
19 public String toString1() { return "$&"; }
\r