* <p>
* The only potential difference between using the methods of Replacer to do the
* replacing is that Replacer remembers changes to the replacing object between
- * calls to replaceAll, replaceFirst etc. For details, see the example file <a
- * href="http://javaregex.com/code/trans3.java.html">trans3.java</a>.
+ * calls to replaceAll, replaceFirst etc. For details, see the example file
+ * <a href="http://javaregex.com/code/trans3.java.html">trans3.java</a>.
*
* @see com.stevesoft.pat.Transformer
* @see com.stevesoft.pat.Regex
{
}
- public StringLike replaceFirstRegion(String s, Regex r, int start, int end)
+ public StringLike replaceFirstRegion(String s, Regex r, int start,
+ int end)
{
return replaceFirstRegion(new StringWrap(s), r, start, end);
}
{
while (x != null)
{
- if (x instanceof SpecialRule
- || (x instanceof RuleHolder && ((RuleHolder) x).held instanceof SpecialRule))
+ if (x instanceof SpecialRule || (x instanceof RuleHolder
+ && ((RuleHolder) x).held instanceof SpecialRule))
{
return true;
}
lastMatchedTo = 0;
if (rh.me == null)
{
- throw new NullPointerException(
- MessageManager
- .getString("exception.replace_null_regex_pointer"));
+ throw new NullPointerException(MessageManager
+ .getString("exception.replace_null_regex_pointer"));
}
if (rh.me._search(s, start, end))
{
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._search(s, i, end); i = rmn)
{
rmn = rh.me.matchedTo();
if (rh.me.charsMatched() == 0)