[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regexp



On Thu, Jun 28, 2001 at 12:09:49PM +0400, Alexander Taranov wrote:
> "Immanuel Litzroth" <immanuel_litzroth@hotmail.com> writes:
> > The manual says :
> > The first string in this list is the portion of string that
> > matched pattern. If two portions of string can match pattern, then
> > the earliest and longest match is found.
>
> string "" is really _earliest_ match because a* means `zero or more
> occurences of 'a'. regexp "aa*" will work exactly as you expect

	That's right, but the empty string is not the ealiest and
*longest* match. Is this a symptom of the regexp machinery?

-- 
%!PS
297.6 420.9 translate 90 rotate 0 setgray gsave 0 1 1{pop 0 180 moveto 100
180 170 100 170 -10 curveto 180 -9 180 -9 190 -10 curveto 190 100 100 180
0 180 curveto fill 180 rotate}for grestore/Bookman-LightItalic findfont
240 scalefont setfont -151.536392 -63.7998886 moveto (bp)show showpage