From: Ron Jeffries Date: 2002-02-14T03:54:51+09:00 Subject: Re: simple XML parsing (greedy / non-greedy On Wed, 13 Feb 2002 17:54:28 GMT, Dave Thomas wrote: >When you say .*?, you're changing the semantics, so that it does the >reverse. It the .*? first consumes no characters, and then says "am I >now looking at ''. Nope, so it consumes one, asks again. Still >fails. Consumes another, fails. Finally, just when you or I would have >given up and gone for a drink, in consumes another and matches. 'aaa' >is matched, and Ron is happy. I'd rather have the drink. But that is what I imagined it must do, working its way forward, step by step, inch by inch ... > >[You can cut this out and paste it to your book, making it a special >Jeffries edition pickaxe, which one day might be terribly, terribly >valuable]. Yes, I daresay ... Thanks for the tip on Friedl, I guess I'll click it ... Niagara Falls! ... Ronald E Jeffries http://www.XProgramming.com http://www.objectmentor.com I'm giving the best advice I have. You get to decide whether it's true for you.