AGG Software Forums
November 25, 2024, 12:52:19 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome on our forum!
 
   Home   Help Search Login Register  

Pages: [1]
  Print  
Author Topic: Data Parsing - Dealing With Random Double Spaces  (Read 10797 times)
m2sys
Newbie
*

Karma: +0/-0
Posts: 1


View Profile
« on: August 13, 2012, 11:11:36 PM »

So I'm trying to get this setup to work with our Mitel 3000...And I'm very close. Right now I have everything working when our data comes in like this:

O/G      08-13-12 14:25:35 00:01:49 L01 E1733 E1733 4044335526#0D#0A

I have some fixed positioning taking care of everything up to the line (L01 in this example), and from there I use deliminated positioning with " " (That's a single space) to chop things up. That works great!

Problem is that from time to time we get data from the system like this:

I/C      08-13-12 14:33:27 00:00:55 L01 E710  E1724 16782071689 #0D#0A

When this happens we don't get valid data base the E710 entry, since there are two spaces between that and the next field, E1724

So I'm stuck here, don't know the best way to approach it. We were thinking there might be away to convert any double spaces into a single space before parsing, but if there is we can't figure it out.
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
*****

Karma: +0/-0
Posts: 806



View Profile WWW
« Reply #1 on: August 14, 2012, 08:16:04 AM »

Unfortunately, I can only offer to use regular expressions or we can create a custom parser for our Advanced PBX Data Logger software if you'll provide a description of this format.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines