fancy_regex

Function escape

source
pub fn escape(text: &str) -> Cow<'_, str>
Expand description

Escapes special characters in text with ‘\’. Returns a string which, when interpreted as a regex, matches exactly text.