From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Fri, 24 Oct 2008 12:54:55 -0400 To: rudolf.sykora@gmail.com, 9fans@9fans.net Message-ID: In-Reply-To: References: <765ef13a653652d5fcef9001ff70f814@quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] non greedy regular expressions Topicbox-Message-UUID: 26323266-ead4-11e9-9d60-3106f5b1d025 > Ok, so despite the documentation, some submatch tracking is there. > But in all (?) your examples, as well as in the scripts you mentioned, > this tracking is exclusively used with the s command (which is said to > be unnecessary at least in sam/acme). If I try sth. like > /( b(.)b)/a/\1\2/ this is covered in the sam paper in the section where pike discusses s. > Further, in R. Cox's text (http://swtch.com/~rsc/regexp/regexp1.html) > he claims that all nice features except for backreferences can be > implemented with Thomson's NFA algorithm. And even the backreferences > can be handled gracefully somehow. That is: ALL: non-greedy operators, > generalized assertions, counted repetitions, character classes CAN be > processed using the fast algorithm. Why then we don't have it? let me turn this around. why would these additions (complications) benefit plan 9? - erik