diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 93bc5f81d..81b10b43a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -47,6 +47,7 @@ Alexander Presnyakov abdo aplaice phwoo +Soren Bjornstad ******************** diff --git a/rslib/src/tags.rs b/rslib/src/tags.rs index f1ef9e306..b5e439476 100644 --- a/rslib/src/tags.rs +++ b/rslib/src/tags.rs @@ -152,7 +152,7 @@ impl Collection { let matcher = regex::RegexSet::new( tags.iter() .map(|s| regex::escape(s)) - .map(|s| format!("(?i){}", s)), + .map(|s| format!("(?i)^{}$", s)), ) .map_err(|_| AnkiError::invalid_input("invalid regex"))?;