platform/shared/rubyJVM/src/org/apache/oro/text/regex/Perl5Substitution.java in rhodes-1.2.2 vs platform/shared/rubyJVM/src/org/apache/oro/text/regex/Perl5Substitution.java in rhodes-1.4.0

- old
+ new

@@ -161,11 +161,11 @@ char[] _substitutionChars; transient String _lastInterpolation; private static final boolean __isInterpolationCharacter(char ch) { - return (Character.isDigit(ch) || ch == '&'); + return (Character.isDigit(ch) || ch == '&' || ch == '{'); } private void __addElement(int value) { int len = _subOpcodes.length; if (_subOpcodesCount == len) { @@ -216,15 +216,21 @@ __addElement(0); posParam = 0; saveDigits = false; continue; } - } + } else if(c == '{') { + continue; + } __addElement(posParam); posParam = 0; saveDigits = false; - } + + if(c == '}') { + continue; + } + } if ((c != '$' && c != '\\') || escapeMode) { escapeMode = false; if (offset < 0) { offset = current;