pub fn regex_escape(text: &str) -> String
text with every regex metacharacter backslash-escaped, so it matches itself (in Java’s regex syntax, which the appliance uses, and in Rust’s).
text