LPM: parsing

David Hempy hempy at ket.org
Tue Sep 5 21:27:01 CDT 2000


At 09:30 PM 9/5/2000 -0400, you wrote:
>Hi Lexpm,
>
>I need a parser.  I want to parse text with multiline and possibly
>nested
>delimiters (like HTML tags but not).  I looked at Parse::RecDescent
>but it looks way more than I want.  Essentially, I just want to say
>"here's my delimiter, now give me the stuff it delimits."  Any
>suggestions?
>
>-Frank.
>--
>Frank Price | fprice at upended.org | www.upended.org/fprice/
>GPG key: www.upended.org/fprice/gpg.asc | E Pluribus Unix


If you need to parse things like the following two lines consisting of 
three values each...

Janine,Louisville,"dog, cat",purple
Dave,Lexington,"dogs, cats, and hairballs",red

...you can use Text:CSV.  It will let you specify your own delimiters.  I 
thing you can change the record delimiter (ie. linefeed) to parse multiline 
stuff.

Will that do what you need?

-dave




--
David Hempy
Internet Database Administrator
Kentucky Educational Television
<hempy at ket.org> -- (859)258-7164 -- (800)333-9764





More information about the Lexington-pm mailing list