X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fcom%2Fstevesoft%2Fpat%2FReplacer.java;h=ce512a5d31f007aa5fa4b425b8bc1ec29f599833;hb=4231d40261fef32ce4570a6bbad0d35df44e8baf;hp=b886f6abb7d10a00fab2e5ce0930b23b6e44e691;hpb=c07eb2c5794833bd0241000d6844d783fe10cb82;p=jalview.git diff --git a/src/com/stevesoft/pat/Replacer.java b/src/com/stevesoft/pat/Replacer.java index b886f6a..ce512a5 100755 --- a/src/com/stevesoft/pat/Replacer.java +++ b/src/com/stevesoft/pat/Replacer.java @@ -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;