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
--marmotIn reply to Re^4: Recursive Regex
by furry_marmot
in thread Parsing using Regex and Lookahead
by deMize
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |