It would be great to have an effective #public synchronized boolean match(CharSequence pattern, CharSequence input) and #public synchronized String substitute(CharSequence expression, CharSequence input) methods. Otherwise we need to copy the CharSequence into the String, which is cumbersome both in notation and in performance. I hope there would be a way for you to achieve it without breaking compatibility with earlier JDKs (if you care).
We have avoided making use of J2SE 1.4 features to maintain backward compatibility. We intend to use conditional compilation to provide different versions for J2ME, J2SE < 1.4 and J2SE >= 1.4. At that time, we will make use of 1.4isms like CharSequence.
Ability to use char[] is even better. It is usually possible to effectively wrap/unwrap char[] arrays into whatever CharSequence objects we have. And no J2SE 1.4 dependency required. org.apache.oro.text.perl.Perl5Util.match seems to have char[] argument already. May I ask for other methods to have fast char[] variants also? In particular, for: org.apache.oro.text.perl.Perl5Util.split( Collection, String, String, int ) org.apache.oro.text.perl.Perl5Util.substitute( StringBuffer, String, String ) and org.apache.oro.text.regex.MatchResult.group( int )
Afterthought, it is less important to have a char[] alternative to org.apache.oro.text.regex.MatchResult.group( int ) since in most cases we will append the result to something else using String.getChars. But org.apache.oro.text.perl.Perl5Util.split( Collection, String, String, int ) org.apache.oro.text.perl.Perl5Util.substitute( StringBuffer, String, String ) are still important, becouse their arguments might be quite big and there is no way to wrap existing char[] array into String without needless copying.
For org.apache.oro.text.perl.Perl5Util.split it is even better to use the org.apache.oro.text.regex.PatternMatcherInput as parameter. split already uses PatternMatcherInput! And PatternMatcherInput allows to specify a part of char[] array - perfect. It seems quite reasonable to include a method which accepts PatternMatcherInput directly, instead of creating it every time from String. Am I missing something? : )
The org.apache.oro.text.regex package contains already everything i need to work with char[] arrays. Sorry for the buzz.