progs/catastrophic.java
changeset 558 447ed6c7cdad
parent 474 4bdf0dedd708
child 616 24bbe4e4b37b
--- a/progs/catastrophic.java	Sun Sep 23 09:04:24 2018 +0100
+++ b/progs/catastrophic.java	Mon Sep 24 11:05:39 2018 +0100
@@ -1,7 +1,16 @@
-// a case of catastrophic backtracking in Java
+// A case of catastrophic backtracking in Java 8
+//-----------------------------------------------
 //
 // regexp: (a*)*b
 // strings: aa....
+//
+// compile:    javac catastrophic.java
+// call with:  java catastrophic
+//
+// IMPORTANT: 
+// Java 9 improved its regex matching engine.
+// This example is now much faster.
+//
 
 import java.util.regex.*;