Results 1 to 1 of 1
I have a file called messages.boot in my home folder which is matched by this:
find . -regex .*messages\.boot
but not by this:
find . -regex .*mes\{2\}ages\.boot
In the manual ...
- 03-17-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 4
curly braces dont seem to work using -regex with find
I have a file called messages.boot in my home folder which is matched by this:
find . -regex .*messages\.boot
but not by this:
find . -regex .*mes\{2\}ages\.boot
In the manual it says the default type of regular expressions is emacs which uses \{n\} to specify the number of times the preceding character should appear so I don't see why that won't work.
BTW I know i can specify what type of regex i want to use in the find command, but i'd rather save the extra typing and use the default most of the time.


Reply With Quote