I still don't get it - give me an example.

Lets say you are reading lines from a file in Java. You want to extract a filename, an amount and a date from each line:

  f:\db4\q1\A404.rt, 3500.0000 , 0 , 01/11/2005, , J NEVILLE., 49.00,   11/01/2005, Notes 3.11
  f:\db4\q1\A482.rt, 1500.0000 , 0 , 01/21/2006, , A MONTGOMERY., 24.00,   19/01/2002, Amendment #4
  f:\db4\q1\A414.rt, 3500.0000 , 0 , 01/22/2006, , J DUNNE., 19.00,   02/01/2001, Amendment #193
  f:\db4\q1\A443.rt, 4500.0000 , 0 , 01/22/2006, , H JEFFERSON., 33.00,   24/01/2005, NA
  f:\db4\q1\A443.rt, 3500.0000 , 0 , 01/23/2006, , C ENNIS., 90.00,   08/01/2000, Real #30
  f:\db4\q1\A4476.rt, 1500.0000 , 0 , 01/24/2006, , P DOYLE.,C WILLS., 19.00,   02/01/2003, Amendment #4

 

My old way (60 minutes):
1. Find an example of how Java Regex works.
2. Try a simple expression to extract the yellow windows file field.
3. Work out that the dots in the filename need to be escaped in the regular expression string.
4. Work out that the backslashes in the path need to be escaped also.
5. Work out that the backslashes need to be doubly escaped - once for Java and once for the regular expressions.
6. Match the blue amount column because on its left hand side is an integer and on its right a date.
7. Match the green date column because on its left is the amount.
8. Work out that the forward slashes need to be escaped in the date expression.
9. Test, test, test.

With txt2regex (5 minutes):
1. Paste a line from the file into txt2re.
2. Click on the 'windows_filename_no_spaces' pattern, the 2nd 'real_number' pattern and the second 'dd-mm-yyyy'.
3. Click on Java.
4. Integrate logic into program.