Re: [bug #58384] incorect documentaion for -regex

Gilles Crèvecœur via Bug reports for the GNU find utilities <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
On Wed, May 20, 2020 at 06:36:10AM -0400, Geoff Clare wrote:
> Follow-up Comment #2, bug #58384 (project findutils):
> 
> Seems the documentation is wrong:
> 
> $ find . -type f -regex '.\{3,\}' | wc -l                       
> 0
> $ find . -regextype posix-basic -type f -regex '.\{3,\}' | wc -l
> 16
> 
> Clearly the default is not posix-basic.

Indeed, the documentaion says the default regexps are compatible with
emacs regexp.  Even there is a link to emacs regexp node. But emacs
regexps understand the syntax `\{3,\}'.  That's the point I mean by
"incorrect documentaion".
So, I used 
    $ find . -type f -regex-type posix-extended -regex '.{3,}'
instead.  This latter command works perfectly.

So, the emacs regexp style of find is not compatible with emacs regexp!
Sadly, that led me to waste time to investigate why my regexp did not
work.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.