bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: is expr's \? regex metachar working?


From: Clark Morgan
Subject: Re: is expr's \? regex metachar working?
Date: Thu, 23 Aug 2001 07:30:51 -0700
User-agent: Mutt/1.2.5i

On Thu, Aug 23, 2001 at 04:04:53PM +0200, Andreas Schwab wrote:
> "Clark O. Morgan" <cmorganOaracnet.com> writes:
> 
> |> $ ./expr "abcdef" : '.*u\?'
> |> 6
> |> $ ./expr "abcdef" : '.*b\?'
> |> 6                           <--- this looks wrong
> 
> No, this is correct.  The '.*' regexp matches the maximum possible length,
> which is all 6 characters.  Since b is optional, it does not cause a match
> failure.

In that case, \? is worthless (i.e., can't tell the difference
between a match or nonmatch).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]