bugfindutils - Bugs: bug #58384, incorect documentaion for -regex

 
 

bug #58384: incorect documentaion for -regex

Submitted by:  None
Submitted on:  Sun 17 May 2020 06:44:02 PM UTC  
 
Category:  documentation Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  None
Fixed Release:  4.7.0

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 22 May 2020 11:03:23 AM UTC, comment #3: 

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 meant 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.

Gilles Crèvecœur <enikar>
Wed 20 May 2020 10:36:10 AM UTC, comment #2: 

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.

Geoff Clare <geoffclare>
Mon 18 May 2020 04:33:14 PM UTC, comment #1: 

Read on a litte bit:

There are several varieties of regular expressions; by default this
test uses POSIX basic regular expressions, but this can be changed
with the option @samp{-regextype}.

Andreas Metzler <ametzler>
Sun 17 May 2020 06:44:02 PM UTC, original submission:  

Hi,

In find.texi line 488, it is sayed that regular expression used
in find are compatible with emacs regexp. Yet, I tried to
use `find -type f -regex '.\{3,\}'` to find files whose names
are longer that 2 characters. There are existing, anyway.
Find gave me no answer. I think the default regular expressions
in find are not the same as emacs regexp.

For completness, I use find from debian/sid package.

By the way, I thank you for yours excellent tools.
Cheers

Gilles Crèvecœur

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by geoffclare (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.7