GNU Rush – a restricted user shell (split by node):   Section:   Chapter:FastBack: Configuration File   Up: Configuration File   FastForward: Default Configuration   Contents: Table of ContentsIndex: Concept Index

4.5 Regex

The regex statement configures the flavor of regular expressions for use by subsequent command, match and transform statements.

Configuration: regex regex-flags

Configure the type of regular expressions.

Regex-flags is a whitespace-separated list of flags. Each flag is a word specifying some regular expression feature. It can be preceded by ‘+’ to enable this feature (this is the default), or by ‘-’ to disable it. Valid flags are:

extended

Use POSIX Extended Regular Expression syntax when interpreting regex. This is the default.

basic

Use basic regular expressions. Equivalent to ‘-extended’.

icase

Do not differentiate case. Subsequent regex matches will be case insensitive.

For example, the following statement enables POSIX extended, case insensitive matching:

regex +extended +icase

The regex settings affect subsequent command and match statements (see Conditions), and remain in effect until next regex statement or the end of configuration file, whichever occurs first.