Skip to main content

escape

Function escape 

Source
pub fn escape(s: &str) -> String
Expand description

Escape s so it matches literally as a regex pattern (aggressive mode: regex metacharacters plus spaces and common punctuation are escaped).

assert_eq!(eregex::escape("a.b*c"), r"a\.b\*c");