commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell" <flame...@gmail.com>
Subject Re: svn commit: r634917 - /commons/proper/codec/trunk/src/java/org/apache/commons/codec/language/Caverphone.java
Date Sat, 08 Mar 2008 17:09:00 GMT
On Sat, Mar 8, 2008 at 1:45 AM, sebb <sebbaz@gmail.com> wrote:
> On 08/03/2008, bayard@apache.org <bayard@apache.org> 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: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message