PathEscaper.EscapeRegex

Static Method in PathEscaper

Declaration

public static Regex EscapeRegex(string escapeCharacter, string invalidCharacters)

Description

Creates a regex for escaping paths.

Parameters

escapeCharacterThe character used to replace invalid characters, e.g. "_".
invalidCharactersThe invalid characters that will be replaced by the escaped character.

Returns

RegexThe escape regex.