-//
-// This software is now distributed according to
-// the Lesser Gnu Public License. Please see
-// http://www.gnu.org/copyleft/lesser.txt for
-// the details.
-// -- Happy Computing!
-//
-package com.stevesoft.pat;
-
-/**
- * This method implements the pattern elements $1, $2, etc in a substitution
- * rule. The apply(StringBufferLike sb,RegRes rr) method of this ReplaceRule
- * simply appends the contents of rr.stringMatched(n), where n is the integer
- * supplied to the constructor.
- */
-public class BackRefRule extends ReplaceRule
-{
- int n;
-
- public BackRefRule(int n)
- {
- this.n = n;
- }
-
- public void apply(StringBufferLike sb, RegRes res)
- {
- String x = res.stringMatched(n);
- sb.appendStr(x == null ? "" : x);
- }
-
- public String toString1()
- {
- return "$" + n;
- }
-
- public Object clone1()
- {
- return new BackRefRule(n);
- }
-}
+//\r
+// This software is now distributed according to\r
+// the Lesser Gnu Public License. Please see\r
+// http://www.gnu.org/copyleft/lesser.txt for\r
+// the details.\r
+// -- Happy Computing!\r
+//\r
+package com.stevesoft.pat;\r
+\r
+/**\r
+ * This method implements the pattern elements $1, $2, etc in a substitution\r
+ * rule. The apply(StringBufferLike sb,RegRes rr) method of this ReplaceRule\r
+ * simply appends the contents of rr.stringMatched(n), where n is the integer\r
+ * supplied to the constructor.\r
+ */\r
+public class BackRefRule extends ReplaceRule\r
+{\r
+ int n;\r
+\r
+ public BackRefRule(int n)\r
+ {\r
+ this.n = n;\r
+ }\r
+\r
+ public void apply(StringBufferLike sb, RegRes res)\r
+ {\r
+ String x = res.stringMatched(n);\r
+ sb.appendStr(x == null ? "" : x);\r
+ }\r
+\r
+ public String toString1()\r
+ {\r
+ return "$" + n;\r
+ }\r
+\r
+ public Object clone1()\r
+ {\r
+ return new BackRefRule(n);\r
+ }\r
+}\r