id:2 name:test1 longname:test2 with space longname description:here is my description.id:10 name:test3 longname:test 4 long name description:a discription of test 5
I have data like above and I'd like to get it into a hash like
%hash { 'id:2' =>
{name => test1
longname => test2 with space longname
description => here is my description.},
'id:10' =>
{name => test3
longname => test 4 long name
description: a discription of test 5
}
}
I have tried a multitude of regex/splits and can't quit get it to split the way I want it to..
Thanks in advance
Travis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
I have data like above and I'd like to get it into a hash like
%hash { 'id:2' =>
{name => test1
longname => test2 with space longname
description => here is my description.},
'id:10' =>
{name => test3
longname => test 4 long name
description: a discription of test 5
}
}
I have tried a multitude of regex/splits and can't quit get it to split the way I want it to..
Thanks in advance
Travis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;