Don't ask to ask, just ask | |
PerlMonks |
Poor Man's XML?by Cody Pendant (Prior) |
on Jun 26, 2002 at 03:47 UTC ( [id://177287]=perlquestion: print w/replies, xml ) | Need Help?? |
Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:
I've got an archive of scripts, and I'd like to be able to mark them up in some way, for searching, so that they distinguish between, say, stage directions and speech, or find each character's speeches -- for instance:
or maybe
and I know that this goes against the "do it properly" ethos, but if I didn't want to use XML, has anybody got any suggestions for an XML-like custom markup which makes flat text files easy to search? It doesn't have to be case-insensitive or even whitespace-independent, say if it was just:
That would be cool. Then it can just be read with some regex/for-loop thing like: kind of construct.
I know there's a big "why not do it properly in a database" hanging over this, but assuming text files with custom markup, is there a non-stupid way to do this?
Back to
Seekers of Perl Wisdom
|
|