string input = @"12.2.2010|7";
string pattern = @"|";
foreach (string result in Regex.Split(input, pattern))
{
Console.WriteLine("'{0}'", result);
}
i want to use | as patter but becouse | means or i can’t get 12.2.2010. How can i use | like pattern? I try to use ~ but is the same.
The character
|has a special meaning in a regular expression, which means you have to escape it with a\like so:Check out the following website for some more information: http://www.regular-expressions.info/reference.html