platform/shared/rubyJVM/src/org/apache/oro/text/regex/Perl5Matcher.java in rhodes-1.2.2 vs platform/shared/rubyJVM/src/org/apache/oro/text/regex/Perl5Matcher.java in rhodes-1.4.0
- old
+ new
@@ -1646,10 +1646,24 @@
__lastSuccess = false;
return false;
}
-
+//RHO
+ //move offset in case of success
+ public boolean matchesPrefixEx(PatternMatcherInput input, Pattern pattern)
+ {
+ if ( matchesPrefix(input, pattern ) )
+ {
+ input.setCurrentOffset(__endMatchOffsets[0]);
+ input.setMatchOffsets(__beginMatchOffsets[0], __endMatchOffsets[0]);
+
+ return true;
+ }
+ return false;
+ }
+
+//RHO
/**
* Determines if a string contains a pattern. If the pattern is
* matched by some substring of the input, a MatchResult instance
* representing the <b> first </b> such match is made acessible via