Hello,

I have a string that I would like to parse and change the format.  I'm not
that good at 'map' and I'm just looking for a quick-and-dirty way of doing
this.  I've tried substr and split, but there has to be a simple way to do
this.

My text string looks like

[20060911 14:47:11]p_var1=<SD> KQt=1 HZZ=2: 83,68//p_var2=<QR44> KQt=1
HZZ=4: 77,57,52,52//p_var3=<543210987> KQt=1 HZZ=9:
52,54,48,52,50,57,49,56,50//p_var4=<001> KQt=1 HZZ=3:
48,48,49//p_var5=<12345> KQt=1 HZZ=5: 49,50,51,52,53//p_var6=<20060907>
KQt=1 HZZ=8: 50,48,48,54,48,57,48,55//p_var7=<0000000WR44> KQt=1 HZZ=11:
48,48,48,48,48,48,48,77,57,52,52//p_var8<X> KQt=1 HZZ=2: 83,68//p_var9=<>
NULL

(one lone line)

I would like it "cleaned up" to look like

p_var1='SD'
p_var2='QR44'
p_var3='543210987'
p_var4='001'
p_var5='12345'
p_var6='20060907'
p_var7='0000000WR44'
p_var8='X'
p_var9=''

This is not 'production' or a school assignment, just the output from a file
I need to make easier to read.

Any help would be appreciated!!!

TIA

Jeff

Reply via email to