This commit is contained in:
ranfdev
2023-10-08 16:10:49 +02:00
parent b5b31d6f8c
commit 7866067845
7 changed files with 20 additions and 33 deletions

View File

@ -15,7 +15,7 @@ fn emoji_map() -> &'static HashMap<String, String> {
}
fn validate_topic(topic: &str) -> Result<&str, Error> {
let re = Regex::new(r"^([A-z]|[0-9]|_)+$").unwrap();
let re = Regex::new(r"^\w+$").unwrap();
if re.is_match(topic) {
Ok(topic)
} else {