Regular Expression Basics C# Book

Regular expressions have the following metacharacters:
\ * + ? | { [ () ^ $ . #
To refer to a metacharacter literally, you must prefix the character with a backslash.
In the following example, we escape the ? character to match the string "what?":
using System;
using System.Text.RegularExpressions;
class Program
{
static void Main(string[] args)
{
Console.WriteLine(Regex.Match("what?", @"what\?"));
Console.WriteLine(Regex.Match("what?", @"what?"));
}
}
The output:
what?
what