contact
support
Download
order
news
AGG Software Forums
November 24, 2024, 03:37:06 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Welcome on our forum!
Home
Help
Search
Login
Register
AGG Software Forums
>
Online Help Center
>
Data loggers and plug-ins
>
Regex format for query parse filter
Pages: [
1
]
« previous
next »
Print
Author
Topic: Regex format for query parse filter (Read 16721 times)
microman3000
Jr. Member
Karma: +0/-0
Posts: 13
Regex format for query parse filter
«
on:
January 17, 2013, 03:09:07 PM »
Hi
I am trying to parse the following line from a text log file using Log monitor & export.
ID:34343434#09DEVICE:Device101#09DATETIME:2013-01-17 09:45:05#0D#0A
I need to extract the value of the three items
ID, DEVICE and DATETIME
to separate fields and send them on to a database.
The ID field can vary in length as can the DEVICE field so I can't use "fixed length" in the parser.
Because there is a hex #09 after each field I can't use #09 as the delimiter as it parses the name AND the value. I can't use ":" as a delimiter as it does a similar thing and also the time field uses ":" so it tries the break that apart too.
I then tried using a regex to do the job but your regex evaluator seems to be limited in the expressions it can use.
For example (?<=ID:)(\d{8,12}?) doesn''t work on your system as the evaluator doesn't accept the "(?<=) lookbehind" operator. Neither does it accept the "(?=) lookahead"
Do you have any suggestions. It is such a simple string but I am stumped
Thanks
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: Regex format for query parse filter
«
Reply #1 on:
November 29, 2022, 02:00:00 PM »
Hi,
Expressions for each parser item:
ID\
[^\x09]+)
DEVICE\
[^\x09]+)
DATETIME\
[^\x09\x0D\x0A]+)
Logged
microman3000
Jr. Member
Karma: +0/-0
Posts: 13
Re: Regex format for query parse filter
«
Reply #2 on:
January 17, 2013, 10:35:39 PM »
Do I have to use the smiley faces?
lol
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: Regex format for query parse filter
«
Reply #3 on:
November 29, 2022, 02:00:00 PM »
Sorry,
Expressions for each parser item:
Code:
ID\:([^\x09]+)
DEVICE\:([^\x09]+)
DATETIME\:([^\x09\x0D\x0A]+)
Logged
microman3000
Jr. Member
Karma: +0/-0
Posts: 13
Re: Regex format for query parse filter
«
Reply #4 on:
January 17, 2013, 10:56:56 PM »
Thanks Arthur, you are a very smart chap! Thanks
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
News & Feedbacks
-----------------------------
=> News and Updates
=> Site Comments
-----------------------------
Online Help Center
-----------------------------
=> Advanced Serial Port Monitor
=> Data loggers and plug-ins
=> Data loggers ActiveX
=> Advanced USB Port Monitor
=> Virtual Null Modem
=> Software for DNC and CNC
=> Other questions
-----------------------------
Development
-----------------------------
=> Feature Requests
Loading...