On Sat, Mar 8, 2008 at 1:45 AM, sebb <[EMAIL PROTECTED]> wrote: > On 08/03/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Author: bayard > > Date: Sat Mar 8 01:40:15 2008 > > New Revision: 634917 > > > > URL: http://svn.apache.org/viewvc?rev=634917&view=rev > > Log: > > Oops; use replaceAll, not replace - stop trying to optimize for ^ > > But how can the longer strings match again after the replacement has > happened?
replace(String, String) is JDK 1.5; and not regexp based. I could use replaceFirst; but replaceAll ought to be smart enough to optimize "^...." and ".....$" to replaceFirst. I'll have a play and see if it is. Hen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]