Next: , Previous: Invoking xargs, Up: Reference

7.5 Regular Expressions

The ‘-regex’ and ‘-iregex’ tests of find allow matching by regular expression, as does the ‘--regex’ option of locate. There are many different types of Regular Expression, but the type used by find and locate is the same as is used in GNU Emacs. Both programs 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: