I don't know the complete set of characters - but I wouldn't rely on the knowledge anyway, and I wouldn't put it into code. Instead, I would use Regex.Escape
whenever I wanted some literal text that I wasn't sure about:
// Don't actually do this to check containment... it's just a little example.
public bool RegexContains(string haystack, string needle)
{
Regex regex = new Regex("^.*" + Regex.Escape(needle) + ".*$");
return regex.IsMatch(haystack);
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…