Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: String matching and Regular Expressions

by kallol.chakra (Initiate)
on Aug 29, 2009 at 20:44 UTC ( #792112=note: print w/replies, xml ) Need Help??

in reply to String matching and Regular Expressions

Hi, I have a doubt about this. Lets take this scenario. The Input data is as follows: header { subheader1 { field1 : value field2 : value field3: value } subheader2 { subheader3 { field4 : value field5 : value field6: value } subheader4 { field7 : value field8 : value field9: value } } } header { subheader1 { field1 : value1 field2 : value1 field3: value1 } subheader2 { subheader3 { field4 : value1 field5 : value1 field6: value1 } subheader4 { field7 : value1 field8 : value1 field9: value1 } } } The output will be : field1,field2,field3,field4,field5,field6,field7,field8,field9 value,value,value,value,value,value,value,value,value value1,value1,value1,value1,value1,value1,value1,value1,value1 Here main problem is that: The value os field2 or field3 may be missing then the output may be: field1,field2,field3,field4,field5,field6,field7,field8,field9 value,value,value,,value,value,value,value,value value1,value1,value1,value1,value1,value1,,value1,value1 In the above output The first line field4 is missing and in the second line field7 is missing How Can I get the output can you please help me.
  • Comment on Re: String matching and Regular Expressions

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://792112]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2016-10-25 17:03 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (326 votes). Check out past polls.