From: Kenneth McDonald Date: 2008-09-10T00:35:34+09:00 Subject: Re: Oniguruma question It was part of a unit testing suite. I did figure out where I was going wrong, a silly mistake on my part which I should've been past years ago. Thanks for the help. Ken On Sep 9, 2008, at 1:24 AM, Robert Klemme wrote: > On 08.09.2008 19:38, Kenneth McDonald wrote: >> I'm writing a library to make re's easier to use :-) This is in >> the test suite. >> Thanks for the feedback, that comes as a real surprise to me. So >> maybe I'll try /..+?/ > > This one won't match after "aa". Instead it will match "aa". I do > not know what you intend to match so I cannot really comment. This > is clearly a toy example, isn't it? There are multiple ways to > match "bb" in "aabb" and it is completely unclear to me what you are > after. > > Your original RX literally translated means "match anything which is > not preceded by a" which is especially true for every character at > the beginning of a string. > > Btw, I can recommend "Mastering Regular Expressions" - it is a > really good book on the matter. > > Kind regards > > robert >