Re: parsing string output that isn't CSV, but similar; what module would parse these kind of key-value pairs?

2014-12-19 Thread Mike Raynham
On 16/12/2014 20:05, Kenneth Wolcott wrote: > Hi; > > I've got some strings that I need to parse the value(s) off of the key. > > The key is (possibly) space-separated and terminate by a colon, and > the value is delimited by single quotes. But there are (potentially) > additional values for

Re: parsing string output that isn't CSV, but similar; what module would parse these kind of key-value pairs?

2014-12-16 Thread Brandon McCaig
On Tue, Dec 16, 2014 at 4:29 PM, Kenneth Wolcott wrote: > Well, I had to look at > http://perldoc.perl.org/perlrequick.html#Extracting-matches to find > out how much I had forgotten about extracting matches from a regex :-) > > This might be inefficient, but it seems to work: > > $shared_folder =~

Re: parsing string output that isn't CSV, but similar; what module would parse these kind of key-value pairs?

2014-12-16 Thread Kenneth Wolcott
On Tue, Dec 16, 2014 at 12:18 PM, Tiago Hori wrote: > Have you tried Text::CSV_XS? It allows you to set both the separatist and eol > and it also lets you use complex separators. > > T. > > Sent from my iPhone > >> On Dec 16, 2014, at 4:05 PM, Kenneth Wolcott >> wrote: >> >> Hi; >> >> I've got

Re: parsing string output that isn't CSV, but similar; what module would parse these kind of key-value pairs?

2014-12-16 Thread Tiago Hori
Have you tried Text::CSV_XS? It allows you to set both the separatist and eol and it also lets you use complex separators. T. Sent from my iPhone > On Dec 16, 2014, at 4:05 PM, Kenneth Wolcott wrote: > > Hi; > > I've got some strings that I need to parse the value(s) off of the key. > > T

parsing string output that isn't CSV, but similar; what module would parse these kind of key-value pairs?

2014-12-16 Thread Kenneth Wolcott
Hi; I've got some strings that I need to parse the value(s) off of the key. The key is (possibly) space-separated and terminate by a colon, and the value is delimited by single quotes. But there are (potentially) additional values for the key. Here is one real-world example (excerpt from th

Re: Parsing String

2007-03-28 Thread Tom Phoenix
On 3/28/07, Brandino Andreas <[EMAIL PROTECTED]> wrote: i am trying to parse the output of a command. The text is multilined. I would like to match the first word after a specific text. for example: text1: value1 text2: value2 Perhaps you want this? m{text1:\s+(.*?)\s+text2:\s

Parsing String

2007-03-28 Thread Brandino Andreas
Hi list, i am trying to parse the output of a command. The text is multilined. I would like to match the first word after a specific text. for example: text1: value1 text2: value2 Value1 & value2 are random and non pattern specific. Is there any way to catch for example "value2"? Sp