Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Recursive Regex

by furry_marmot (Pilgrim)
on Mar 19, 2009 at 21:02 UTC ( [id://751875]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Recursive Regex
in thread Parsing using Regex and Lookahead

Maybe I'm missing something, but why do you want the input all on one line? It seems to me that you're creating the problem you're trying to solve when there wasn't a problem in the first place.

If you put multiple inline statements on separate lines, you wouldn't have the problem. Since this already resembles a .INI format, why not just take it a little further:

[section] head=Title Text Blah Blah Blah <--body text

Specific items (like head, div, section) are called out in some easily parseable fashion, and plain text defaults to body text. Running it all together as one line just makes a huge parsing problem. But in something like the above example, you don't need split() or lookaheads and the parsing is trivial.

my 2 cents

--marmot

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://751875]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-24 06:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found