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 O. Morgan
Subject: Re: is expr's \? regex metachar working?
Date: 23 Aug 2001 07:34:02 -0700

In article <address@hidden>, address@hidden says...
>|> $ ./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.


Then, it appears that expr's \? is of little value -- can't detect the
difference between a match or a nonmatch (as shown above).




reply via email to

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