forked from jmug/stoatchat
10 lines
263 B
Rust
10 lines
263 B
Rust
use once_cell::sync::Lazy;
|
||
use regex::Regex;
|
||
|
||
/// Regex for valid usernames
|
||
///
|
||
/// Block zero width space
|
||
/// Block lookalike characters
|
||
pub static RE_USERNAME: Lazy<Regex> =
|
||
Lazy::new(|| Regex::new(r"^[^\u200BА-Яа-яΑ-Ωα-ω@#:\n\r\[\]]+$").unwrap());
|