harishnuti has asked for the wisdom of the Perl Monks concerning the following question:
I have a Typical requirement which includes
Extraction of patterns from below chunk of text.
My text to be splitted into key:value pairs as below..
while (){ chomp($_); push(@splittedline,$+ ) while $_ =~m{ ([^\S\s*:\S\s*]*) }gx; } # Sorry iam poor in regular expressions # i tried several regular expressions, above gives error # and doesnt work properly # finally @splitted line should contain key value pairs # One might wonder what above is, my requirement is to # read the TNG scheduler output containing Jobs info # and nicely format into text document
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Selective String extraction & formatting
by moritz (Cardinal) on Jul 03, 2008 at 08:51 UTC | |
by harishnuti (Beadle) on Jul 03, 2008 at 09:17 UTC | |
by ww (Archbishop) on Jul 03, 2008 at 12:17 UTC | |
by harishnuti (Beadle) on Jul 09, 2008 at 13:47 UTC |