in reply to Re: Parse structured text using regex
in thread Parse structured text using regex

Thanks for help. I see that split needs to be in it somewhere. What I got from that is:
[ [["global_model", "CAR"]], [ [ "pairs", "\nMODEL", "Make=Mustang", "Quality=A", "Speed=\nMODEL", "Chevy=Cavalier\nMODEL\n", "Color=blue", "type=hatchback", "crashrating=spectacular\n", "explodes=true", "speed=", "storage=none,little\n", ], ], ]
What I am looking for is this:
{ CAR => [ { MODEL => { Make => "Mustang", Quality => "A", Speed => un +def } }, { MODEL => { Chevy => "Cavalier" } }, { MODEL => { Color => "Blue", crashrating => "spectacular", explodes => "true", speed => undef, storage => "none,little", type => "hatchback", }, }, ], }
Maybe I am missing something...?

Replies are listed 'Best First'.
Re^3: Parse structured text using regex
by kcott (Archbishop) on Mar 17, 2014 at 05:42 UTC
    "What I am looking for is this: { ... }"

    That should have appeared in your OP, not here.

    You've been here almost two years and, by now, should have read "How do I post a question effectively?". Please follow its guidelines in any future postings.

    -- Ken

        "So I know to not be deterred by a Senior Monk indiscriminately linking to "How to post a question effectively""

        There's nothing indiscriminate in what I posted. At the top of "How do I post a question effectively?" it clearly says, in large, bold letters:

        Be precise about the correct behavior / desired output.

        You failed to do this in your OP. Please make an effort to follow this guideline in future.

        -- Ken