How to parse a time with a timestamp in seconds instead of a formatted date time?


How to parse a time with a timestamp in seconds instead of a formatted...
Author
Message
ChrisAbbott
ChrisAbbott
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
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

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
ChrisAbbott - Last Month
LogViewPlus Support - Last Month
ChrisAbbott - 7 days ago @ 12:36 PM
ChrisAbbott - 7 days ago @ 12:40 PM
LogViewPlus Support - 7 days ago @ 6:21 PM
                 Thanks, I'll give the BETA a g
ChrisAbbott - 6 days ago @ 2:26 PM
LogViewPlus Support - 6 days ago @ 5:57 PM
                         Well trying the BETA I did notice that there is a popup menu missing:...
ChrisAbbott - 6 days ago @ 6:55 PM
                             Thanks for bringing this to my attention Chris. I can confirm this is...
LogViewPlus Support - 6 days ago @ 9:17 PM
                                 Hi Chris, We have now released LogViewPlus 3.2.7 as a BETA Release ....
LogViewPlus Support - 5 days ago @ 6:11 PM

Similar Topics

Login

Explore
Messages
Mentions
Search