|
Group: Forum Members
Posts: 5,
Visits: 7
|
Hi, I want to parse files with lines as in attached file, I can do this with redis rules, but cannot get the "mandatory date" to work: ^\s*(?<msgnum>\d+)\)\s+(?<time>\d+\.\d+)\s+(?<type>\w+)\s+(?<COBid>[0-9A-F]+)\s+(?<len>\d+)\s+(?<data>.*)
<time> needs to be <d> but with something else so it can 12738.2 into 12738.2 seconds
The "un-altered" file also contains "comment" lines that start with ";" and do not follow the format, but I have no idea how to get the parser to ignore these.
Also: With the pattern parser I could not find anyway to indicate 1 or more white spaces between elements
File content: 34) 12947.7 Rx 0710 1 05 35) 12966.3 Rx 072B 1 7F 36) 13042.5 Rx 0000 2 01 2B 37) 13043.2 Rx 03AB 1 00 38) 13066.3 Rx 072B 1 05 39) 13140.9 Rx 073C 1 7F 40) 13167.4 Rx 063C 8 23 E0 20 01 EA 39 98 CA 41) 13168.0 Rx 05BC 8 60 E0 20 01 00 00 00 00 42) 13169.1 Rx 062B 8 23 C9 20 00 27 39 F0 4C 43) 13169.8 Rx 05AB 8 60 C9 20 00 00 00 00 00 44) 13241.7 Rx 072D 1 7F 45) 13468.6 Rx 0000 2 01 2B 46) 13468.8 Rx 0000 2 82 10 47) 13468.9 Rx 0000 2 01 10 48) 13469.1 Rx 0000 2 82 11 49) 13469.2 Rx 0000 2 01 11 50) 13469.3 Rx 0000 2 81 30 51) 13469.4 Rx 0710 1 04 52) 13469.9 Rx 0711 1 04
|