From: Kaspar Schiess Date: 2003-12-04T03:20:49+09:00 Subject: Re: Some Regexp Hello, > Sometimes an imperfect solution is better than none. To borrow > (abuse?) Andy Hunt's carpentry metaphor, sometimes something nailed > together will serve better now than a beautiful piece of joinery > will if it is later. This could be a case where "worse is better" > sometimes. Excuse me to barge in your conversation, but why don't you talk about the correct solution of the [nested tags] problem, which in this case is a school-book like simple solution using racc (or ryacc, last time I looked). file: # empty production | file textblock ; textblock: TEXT1 othertext TEXT2 ; othertext: # empty production | othertext TEXTLINE ; Of course that's just for the parsing. And I realise that there is more than one way to write this. What I am trying to say is that if the book says you best use this kind of tool, then why talk about imperfect half-bread solutions ? The 'perfect' solution is not that far away ! kaspar