var regret = require('regret');

regret.add(
  'ctimeV2', // ctime
  /\w{3} \w{3} (?: \d|\d{2}) \d{2}:\d{2}:\d{2}.\d{3}/,
  'Wed Mar  2 14:42:31.000'
);

regret.add(
  'ctimeV1', // ctime-pre2.4
  /\w{3} \w{3} (?: \d|\d{2}) \d{2}:\d{2}:\d{2}/,
  'Wed Mar  2 14:42:31'
);

regret.add(
  'iso8601_local',
  /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}[+-]\d{4}/,
  '2014-02-13T18:00:04.709-0500'
);

regret.add(
  'iso8601_utc',
  /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z/,
  '1970-01-01T00:00:00.000Z'
);

regret.add(
  'timestamp',
  /({{ctimeV1}}|{{ctimeV2}}|{{iso8601_local}}|{{iso8601_utc}})/
);

regret.add(
  'mongodb.log', 
  /^{{timestamp}} \[(\w+)\] (.*)/,
  '2014-02-13T18:00:04.709-0500 [initandlisten] db version v2.5.6-pre-',
  ['date', 'name', 'message']
);

regret.add(
  'mongodb.logshutdown', 
  /(\w+)\: (.*)/,
  'dbexit: really exiting now', 
  ['name', 'message']
);

module.exports = regret;
@@ -50,21 +50,43 @@
 time
-V2
 ', // c
-time
+overs ctime and ctime-pre2.4
 %0A  /
@@ -128,22 +128,27 @@
 2%7D:%5Cd%7B2%7D
+(?:%7C
 .%5Cd%7B3%7D
+)
 /,%0A  'We
@@ -193,22 +193,22 @@
 %0A  '
-ctimeV
+iso860
 1', // c
 time
@@ -207,127 +207,43 @@
 // c
-time-pre2.4%0A  /%5Cw%7B3%7D %5Cw%7B3%7D (?: %5Cd%7C%5Cd%7B2%7D) %5Cd%7B2%7D:%5Cd%7B2%7D:%5Cd%7B2%7D/,%0A  'Wed Mar  2 14:42:31'%0A);%0A%0Aregret.add(%0A  'iso8601_local',
+overs iso8601-local and iso8601-utc
 %0A  /
@@ -284,16 +284,21 @@
 %7D%5C.%5Cd%7B3%7D
+(?:Z%7C
 %5B+-%5D%5Cd%7B4
@@ -298,16 +298,17 @@
 +-%5D%5Cd%7B4%7D
+)
 /,%0A  '20
@@ -358,142 +358,35 @@
 %0A  '
-iso8601_utc',%0A  /%5Cd%7B4%7D-%5Cd%7B2%7D-%5Cd%7B2%7DT%5Cd%7B2%7D:%5Cd%7B2%7D:%5Cd%7B2%7D%5C.%5Cd%7B3%7DZ/,%0A  '1970-01-01T00:00:00.000Z'%0A);%0A%0Aregret.add(%0A  'timestamp
+mongodb.log
 ',
+ 
 %0A  /
+%5E
 (%7B%7Bctime
 V1%7D%7D
@@ -385,112 +385,23 @@
 time
-V1%7D%7D%7C%7B%7BctimeV2%7D%7D%7C%7B%7Biso8601_local%7D%7D%7C%7B%7Biso8601_utc%7D%7D)/%0A);%0A%0Aregret.add(%0A  'mongodb.log', %0A  /%5E%7B%7Btimestamp%7D%7D
+%7D%7D%7C%7B%7Biso8601%7D%7D)
  %5C%5B(

consolidate cases further