ometa M { digit = ^digit:d -> d.digitValue(), number = number:n digit:d -> (n * 10 + d) | digit, date = number:y '-' number:m '-' number:d -> [y,m,d], time = number:h '\:' number:m '\:' number:s -> [h,m,s], stamp = date:d time:t -> [d,t], channel = (#Local | #Society | #Trade):c, header = stamp:s "[" channel:c "]" :m -> [s,c,m], cglobal = header anything*:name 'manufactured an item (' anything*:item ') worth ' number:val 'PED!' } M.matchAll("2009-08-19","date") M.matchAll("03:33:09","time") M.matchAll("2009-08-19 01:08:46","stamp") M.match("Society","channel") M.matchAll("2009-08-19 01:08:46 [Local]","header") M.matchAll("2009-08-19 01:08:46 [Local] WacKY Loco OnE manufactured an item (OreAmp OA-101 (L)) worth 58 PED!", "cglobal")