Windows Server 2003, Standard Edition; Windows Server 2003, Enterprise Edition; and Windows Server 2003, Datacenter Edition support regular expressions for pattern matching, which is widely used in UNIX environments. You can use this syntax to specify the conditions of remote access policy attributes and RADIUS realms, as specified in the following table.
|
Character
|
Description
|
Example
|
|
\
|
Marks the next character as a character to match.
|
/n/ matches the character "n". The sequence /\n/ matches a line feed or newline character.
|
|
^
|
Matches the beginning of the input or line.
|
|
|
$
|
Matches the end of the input or line.
|
|
|
*
|
Matches the preceding character zero or more times.
|
/zo*/ matches either "z" or "zoo."
|
|
+
|
Matches the preceding character one or more times.
|
/zo+/ matches "zoo" but not "z."
|
|
?
|
Matches the preceding character zero or one times.
|
/a?ve?/ matches the "ve" in "never."
|
|
.
|
Matches any single character except a newline character.
|
|
|
(
pattern
)
|
Matches pattern and remembers the match. To match ( ) (parentheses), use "\(" or "\)".
|
|
|
x
|
y
|
Matches either x or y.
|
/z|food?/ matches "zoo" or "food."
|
|
{
n
}
|
Matches exactly n times (n is a nonnegative integer).
|
/o{2}/ does not match the "o" in "Bob," but matches the first two instances of the letter o in "foooood."
|
|
{
n
,}
|
Matches at least n times (n is a nonnegative integer).
|
/o{2,}/ does not match the "o" in "Bob" but matches all of the instances of the letter o in "foooood." /o{1,}/ is equivalent to /o+/.
|
|
{
n
,
m
}
|
Matches at least n and at most m times (m and n are nonnegative integers).
|
/o{1,3}/ matches the first three instances of the letter o in "fooooood."
|
|
[
xyz
]
|
Matches any one of the enclosed characters (a character set).
|
/[abc]/ matches the "a" in "plain."
|
|
[^
xyz
]
|
Matches any characters that are not enclosed (a negative character set).
|
/[^abc]/ matches the "p" in "plain."
|
|
\b
|
Matches a word boundary (for example, a space).
|
/ea*r\b/ matches the "er" in "never early."
|
|
\B
|
Matches a nonword boundary.
|
/ea*r\B/ matches the "ear" in "never early."
|
|
\d
|
Matches a digit character (equivalent to [0-9]).
|
|
|
\D
|
Matches a nondigit character (equivalent to [^0-9]).
|
|
|
\f
|
Matches a form feed character.
|
|
|
\n
|
Matches a line feed character.
|
|
|
\r
|
Matches a carriage return character.
|
|
|
\s
|
Matches any white space character including space, tab, and form feed (equivalent to [ \f\n\r\t\v]).
|
|
|
\S
|
Matches any non-white space character (equivalent to [^ \f\n\r\t\v]).
|
|
|
\t
|
Matches a tab character.
|
|
|
\v
|
Matches a vertical tab character.
|
|
|
\w
|
Matches any word character, including underscore (equivalent to [A-Za-z0-9_]).
|
|
|
\W
|
Matches any nonword character, excluding underscore (equivalent to [^A-Za-z0-9_]).
|
|
|
\
num
|
Refers to remembered matches (?num, where num is a positive integer). For example, \1 replaces what is stored in the first remembered match. This option can be used only in the Replace text box when configuring attribute manipulation.
|
|
|
/
n
/
|
Allows the insertion of ASCII codes into regular expressions (?n, where n is an octal, hexadecimal, or decimal escape value).
|
|