Regular Expression
/regular expression/ { statements }
Regular expressions are a notation used for specifying and matching strings, or patterns within strings. Regular expressions give you the flexibility to make pattern matches more general than simply, look for this specific string. You can use regular expressions to look for classes of characters or ranges such as numbers, alphabetic characters, or one through seven, to look for varying repetitions of characters such as 0 to many of a character or 0 to 1, and to look for masks of particular character patterns such as the social security number mask of three digits followed by a dash followed by two digits followed by a dash followed by four digits.
For regular expression patterns in pattern-action blocks, the associated action statements are executed for each input line that matches the regular expression. The syntax of this pattern is to enclose a regular expression in / and /. It can be a basic expression or one that applies operators to component expressions. Matches done against regular expressions are case sensitive. For example, the regular expression /Account No/ will match the string "Account No" but not the string "account no". For examples,
Regular Expression.Last modified date: 10/22/2024