[Dirvish] can one use regex in dirvish.conf includes/excludes ?

Richard Geoffrion dirvish at rain4us.net
Fri Oct 13 15:55:32 PDT 2006


Richard Geoffrion wrote:

><snip>
>Well I haven't been able to get a regex working with find!
>
>So far the following options don't work..
>
>find . -regex ^[\d]{5}.+ -maxdepth 1
>find . -regex '^[\d]{5}.+' -maxdepth 1
>find . -regex './[\d]{5}.+' -maxdepth 1
>find . -regex '^\.\/[\d].*' -maxdepth 1
>find . -regex '^\.\/[\d].+' -maxdepth 1
>
>Does anyone else build an exclude list with regedit?
>
>  
>
make an include file:  find all directories that start with five numeric 
digits
    find . -regex './[0-9][0-9][0-9][0-9][0-9].*' -maxdepth 1 -type d
    ls -1 | grep -e '^[0-9][0-9][0-9][0-9][0-9]'

make an exclude file: find all directories that don't start with five 
numeric digits
    find . -regex './[^0-9][^0-9][^0-9][^0-9][^0-9].*' -maxdepth 1 -type d
    ls -1 | grep -e '^[^0-9][^0-9][^0-9][^0-9][^0-9]
    ls -1 | grep -v -e '^[0-9][0-9][0-9][0-9][0-9]'

find produces...
./dirname

and ls produces...
dirname

I think this is enough success for one day.  I'll figure out which one 
to use later!  AAAAHHHHHHH!!!!!

-- 
Richard




More information about the Dirvish mailing list