x Did you like it? Well, then please consider making a donation :)

Miscellaneous constructs either modify a regular expression pattern or provide information about it. The following table lists the miscellaneous constructs supported by the .NET Framework.

PatternDescriptionExample
(?imnsx-imnsx)Sets or disables options such as case insensitivity in the middle of a pattern.\bA(?i)b\w+\b matches "ABA", "Able" in "ABA Able Act"
(?# comment)Inline comment. The comment ends at the first closing parenthesis.\bA(?#Matches words starting with A)\w+\b
#[to end of line]X-mode comment. The comment starts at an unescaped # and continues to the end of the line.(?x)\bA\w+\b#Matches words starting with A