JAL-1807 Bob's first commit -- Applet loaded; needs image
[jalview.git] / src / com / stevesoft / pat / Replacer.java
index b886f6a..ce512a5 100755 (executable)
@@ -7,7 +7,7 @@
 //
 package com.stevesoft.pat;
 
-import jalview.util.MessageManager;
+import com.stevesoft.pat.MessageManager;
 
 import com.stevesoft.pat.wrap.*;
 
@@ -182,7 +182,7 @@ public class Replacer
     {
       throw new NullPointerException(MessageManager.getString("exception.replace_null_regex_pointer"));
     }
-    if (rh.me._search(s, start, end))
+    if (rh.me._searchLike(s, start, end))
     {
       int rmn = rh.me.matchedTo();
       if (rh.me.charsMatched() == 0 && !isSpecial(rh.me.getReplaceRule()))
@@ -193,7 +193,7 @@ public class Replacer
       apply(rh.me);
       if (!first)
       {
-        for (int i = rmn; !want_more_text && rh.me._search(s, i, end); i = rmn)
+        for (int i = rmn; !want_more_text && rh.me._searchLike(s, i, end); i = rmn)
         {
           rmn = rh.me.matchedTo();
           if (rh.me.charsMatched() == 0)
@@ -245,7 +245,7 @@ public class Replacer
       int rmf = r.matchedFrom();
       for (int ii = pos; ii < rmf; ii++)
       {
-        sb.append(src.charAt(ii));
+        sb.appendC(src.charAt(ii));
       }
 
       for (ReplaceRule x = rp; x != null; x = x.next)
@@ -315,7 +315,7 @@ public class Replacer
     int s_end = src.length();
     for (int ii = pos; ii < s_end; ii++)
     {
-      sb.append(src.charAt(ii));
+      sb.appendC(src.charAt(ii));
     }
     src = null;
     lastMatchedTo = pos;