Uh - at the risk of mentioning something that everyone already knows:

>  RegexEncode(Path.GetFileNameWithoutExtension(baseFileName))

Regex.Escape(string str)

Could be what you are looking for.

Reply via email to