From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Mon, 27 Oct 2008 09:28:41 +0100 From: "Rudolf Sykora" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6520c845566013ada472281bf9c0da73@coraid.com> <2e4a50a0810241652r38d2aa1ft2b6fb9104d2988ae@mail.gmail.com> Subject: Re: [9fans] non greedy regular expressions Topicbox-Message-UUID: 2779353e-ead4-11e9-9d60-3106f5b1d025 > Leftmost-first matching is difficult to explain. > When POSIX had to define the rules for regexps, > they chose to define them as leftmost-longest > even though all the implementations were leftmost-first, > because describing leftmost-first precisely was too > complex. > > Leftmost-first matching is not widely understood. > At the beginning of this conversation, you believed that in the > absence of non-greedy operators, leftmost-first matching > produced leftmost-longest matches. I would guess that > more people believe this than know otherwise. Yes. I weren't quite acquainted with the problematics. Probably because I have never bumped into a problem with the leftmost-first implemenatation. Perhaps my problems were just not complex enough to notice a regexp finds sth. different from my expectation. Seems to be a case of majority of people. (E.g. Vim seems to use leftmost-first, too.) Ok. I am just somehow tired now with this. I thank everybody who positively contributed to this thread. I'll wait some time and will try to use what is present and I will see. Ruda