Damien Elmes 2020-08-19 15:35:20 +10:00
parent 529deff82a
commit 8a9a9591cb

View File

@ -135,7 +135,7 @@ impl Collection {
let tags = split_tags(tags)
.map(|tag| {
let tag = if regex { tag.into() } else { text_to_re(tag) };
Regex::new(&format!("(?i){}", tag))
Regex::new(&format!("(?i)^{}$", tag))
.map_err(|_| AnkiError::invalid_input("invalid regex"))
})
.collect::<Result<Vec<Regex>>>()?;