// Time first one . . . for (int i = 4; i > 0; i--) { long count = timesToDo; long startTime = System.currentTimeMillis(); while (--count > 0) regex1.reset(testString).find(); double seconds = (System.currentTimeMillis() - startTime)/1000.0; System.out.println("Alternation takes " + seconds + " seconds"); } ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl