NET/MASTER Management Services (MS) System Management Guide

Regular Expression Syntax
Regular Expressions
115414 NonStop NET/MASTER MS System Management Guide E–3
character-class
specifies a character class, that is, a single character, multiple characters, or
range of characters surrounded by square brackets ([ ]). A match is any
character or range of characters in the class. For example:
Term Meaning
[AEIOU] Matches any uppercase vowel.
[aeiou] Matches any lowercase vowel.
[BCDe] Matches B, C, D, or e.
[B-De^] Matches B, C, D, e, or ^.
[<>^?] Matches <, >, ^, or ?.
A character class cannot enclose another character class. Closure
operators have no special meaning inside a character class.
A circumflex (^) that immediately follows an opening square bracket
inverts the characters in the class. A match is any character or range of
characters not in the class. For example:
Term Meaning
[^AEIOU] Matches any character except an uppercase vowel.
[^aeiou] Matches any character except a lowercase vowel.
[^B-De] Matches any character except B, C, D, or e.
[^0-9] Matches any character except a digit from 0 through 9.
[^A-Z] Matches any character except an uppercase letter.
A hyphen (-) specifies a range of characters in the class. A match is any
character in the range. The beginning character of the range must have a
lower ASCII value than the ending character of the range. For example:
Term Meaning
[B-De] Matches B, C, D, or e.
[B-DzZ] Matches B, C, D, z, or Z.
[A-Z] Matches any uppercase letter.
[a-z] Matches any lowercase letter.
[0-9] Matches any digit.
[a-zA-Z0-9] Matches any alphanumeric character.
[m-z] Matches a lowercase letter from m through z.