/ regular expression /
This is a regular expression used in comparison expressions and some functions. When used in a pattern, each input line is searched for a string matching the regular expression and, if found, the statements in the associated action block are executed.
Example 1
/^Date/ #
Match a line that begins with the word "Date".
Example 2
/^[ ]*[#]+[ ]*$/ #
Match lines containing only pound signs surrounded by blanks.
Example 3
/[0-9][0-9][0-9]/ #
Match a line that contains any three digit number.
Example 4
/[7-9]$/ #
Match a line that ends with a 7, 8, or 9.
Example 5
/[^A-Za-z]/ #
Match a line that contains no alphabetic characters.
Example 6
/^CTS|^(AD)L/ #
Match a line that begins with CTS or ADL or ADADL or #ADADADL.
Example 7
/^[A-Za-z][0-9]?$/ #
Match a line that contains a letter or a letter followed by a digit.
Example 8
/^[+-]?[0-9]+[.]?[0-9]*$/ #
Match a line that contains a decimal number with an
# optional sign and optional faction.
Last modified date: 10/22/2024