(find.info)Regular Expressions


Next: Environment Variables Prev: Invoking xargs Up: Reference
Enter node , (file) or (file)node

8.5 Regular Expressions
=======================

The '-regex' and '-iregex' tests of 'find' allow matching by regular
expression, as does the '--regex' option of 'locate'.

   Your locale configuration affects how regular expressions are
interpreted.  Note: Environment Variables, for a description of how
your locale setup affects the interpretation of regular expressions.

   There are also several different types of regular expression, and
these are interpreted differently.  Normally, the type of regular
expression used by 'find' and 'locate' is almost identical to that used
in GNU Emacs.  The single difference is that in 'find' and 'locate', a
'.' will match a newline character.

   Both 'find' and 'locate' provide an option which allows you to select
an alternative regular expression syntax; for 'find' this is the
'-regextype' option, and for 'locate' this is the '--regextype' option.

   These options take a single argument, which indicates the specific
regular expression syntax and behaviour that should be used.  This
should be one of the following:

findutils-default regular expression syntax
emacs regular expression syntax
gnu-awk regular expression syntax
grep regular expression syntax
posix-awk regular expression syntax
awk regular expression syntax
posix-basic regular expression syntax
posix-egrep regular expression syntax
egrep regular expression syntax
posix-extended regular expression syntax

automatically generated by info2www version 1.2.2.9