Handle repetition range operators with commas in regexes

This commit is contained in:
Max Brunsfeld 2019-01-15 12:13:14 -08:00
parent 0a2d72d956
commit b799b46f79

View file

@ -10,7 +10,7 @@ use regex::Regex;
use std::i32;
lazy_static! {
static ref CURLY_BRACE_REGEX: Regex = Regex::new(r#"(^|[^\\])\{([^}]*[^0-9}][^}]*)\}"#).unwrap();
static ref CURLY_BRACE_REGEX: Regex = Regex::new(r#"(^|[^\\])\{([^}]*[^0-9,}][^}]*)\}"#).unwrap();
}
const ALLOWED_REDUNDANT_ESCAPED_CHARS: [char; 4] = ['!', '\'', '"', '/'];