Apple macOS command line, find -iregex. Where to read about the iregex syntax: how to make a command?

Where to read about the iregex syntax: how to make a command? There are three basic types of regular expressions: basic regular expressions, extended regular expressions, and Perl regular expressions. In -regex what type is used?

I found such a regular expression on the Internet, which is used in -iregex: './[^~][^/]\.xlsm$' What does it mean? Why do I need this: [^~] Why you need this: [^/] Here's why the first slash is needed: \.

In -regex what type is used?

That depends on whether you pass in the -E flag. See the find man page.

Note that the discussion of -E links to the re_format man page, which describes macOS’s default regex syntax.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Quote: That depends on whether you pass in the -E flag. See the find man page.

On the find man page for the -regex and -regex parameters, here is the information: -regex pattern True if the whole path of the file matches pattern using regular expression. To match a file named './foo/xyzzy', you can use the regular expression './[xyz]' or './foo/.', but not 'xyzzy' or '/foo/'. -iregex pattern Like -regex, but the match is case insensitive.

P.S. This forum modifies forum posts so that symbols disappear. There is a double left slash in this expression, and the forum deleted one slash and only one slash remained: './[^~][^/]\. xlsm$'

Apple macOS command line, find -iregex. Where to read about the iregex syntax: how to make a command?
 
 
Q