Partager via


Miscellaneous Constructs 

The following table lists subexpressions that modify a regular expression.

Construct Definition

(?imnsx-imnsx)

Sets or disables options such as case insensitivity to be turned on or off in the middle of a pattern. For information on specific options, see Regular Expression Options. Option changes are effective until the end of the enclosing group. See also the information on the grouping construct (?imnsx-imnsx: ), which is a cleaner form.

(?# )

Inline comment inserted within a regular expression. The comment terminates at the first closing parenthesis character.

# [to end of line]

X-mode comment. The comment begins at an unescaped # and continues to the end of the line. (Note that the x option or the RegexOptions.IgnorePatternWhitespace enumerated option must be activated for this kind of comment to be recognized.)

See Also

Other Resources

Regular Expression Language Elements