some help

H

Hernan

I try to parse this data in another file, it comes from the pbx.

N 074 00 3534 A006028 10/16 09:19:36 00:07:24.0 A95214897
&
000 000
& 000


This formats repeat in every call, my problem comes when I try to fit
all this 3 lines in one line (I can parse 1 string), the data in line
2 and 3 starts after "&".
Please some can help me
Hernan
 
J

James E Keenan

[snip]
This formats repeat in every call, my problem comes when I try to fit
all this 3 lines in one line (I can parse 1 string), the data in line
2 and 3 starts after "&".

Please explain the problem better. In data sample you submitted, there's
nothing after the '&'.
 
H

Hernan

James E Keenan said:
[snip]
This formats repeat in every call, my problem comes when I try to fit
all this 3 lines in one line (I can parse 1 string), the data in line
2 and 3 starts after "&".

Please explain the problem better. In data sample you submitted, there's
nothing after the '&'.

Sorry, when I post this the format change
this are 3 lines (first start whit N the second and third with " &")


N 074 00 3534 A006028 10/16 09:19:36 00:07:24.0 A95214897
& 000 000
& 000
 
J

James E Keenan

[snip]
This formats repeat in every call, my problem comes when I try to fit
all this 3 lines in one line (I can parse 1 string), the data in line
2 and 3 starts after "&".
Sorry, when I post this the format change
this are 3 lines (first start whit N the second and third with " &")


N 074 00 3534 A006028 10/16 09:19:36 00:07:24.0 A95214897
& 000 000
& 000

Okay, so now we know what the incoming data looks like? What elements
of this data do you wish to capture?

Whichever parts you wish to capture, if each incoming data record
consists of a multi-line string, to capture the parts you will
probably use a Perl regular expression which uses the '/s' modifier.
This allows the '.' wildcard to match the newline '\n' character and
hence permits matching over a multi-line string.

HTH
jimk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top