auth regex

This commit is contained in:
MeexReay 2025-02-12 03:18:17 +03:00
parent 9d5ca69a1f
commit 9d087d315b
2 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@
## bRAC ## bRAC
regex - `\uB9AC\u3E70<(.*?)> (.*)` \ regex - `\uB9AC\u3E70<(.*?)> (.*)` \
regex with auth (after sanitizing) - `\uB9AC\u3E70<(.*?)> (.*)\s*>.*` \
color - green \ color - green \
example - `리㹰<nick> text` example - `리㹰<nick> text`

View File

@ -13,7 +13,9 @@ lazy_static! {
static ref DATE_REGEX: Regex = Regex::new(r"\[(.*?)\] (.*)").unwrap(); static ref DATE_REGEX: Regex = Regex::new(r"\[(.*?)\] (.*)").unwrap();
static ref IP_REGEX: Regex = Regex::new(r"\{(.*?)\} (.*)").unwrap(); static ref IP_REGEX: Regex = Regex::new(r"\{(.*?)\} (.*)").unwrap();
static ref COLORED_USERNAMES: Vec<(Regex, Color)> = vec![ static ref COLORED_USERNAMES: Vec<(Regex, Color)> = vec![
(Regex::new(r"\u{B9AC}\u{3E70}<(.*?)> (.*)\s*>.*").unwrap(), Color::Green), // bRAC with auth sanitized
(Regex::new(r"\u{B9AC}\u{3E70}<(.*?)> (.*)").unwrap(), Color::Green), // bRAC (Regex::new(r"\u{B9AC}\u{3E70}<(.*?)> (.*)").unwrap(), Color::Green), // bRAC
// (Regex::new(r"\u{B9AC}\u{3E70}\r<(.*?)> (.*)>\r ").unwrap(), Color::Green), // bRAC with auth
(Regex::new(r"\u{2550}\u{2550}\u{2550}<(.*?)> (.*)").unwrap(), Color::BrightRed), // CRAB (Regex::new(r"\u{2550}\u{2550}\u{2550}<(.*?)> (.*)").unwrap(), Color::BrightRed), // CRAB
(Regex::new(r"\u{00B0}\u{0298}<(.*?)> (.*)").unwrap(), Color::Magenta), // Mefidroniy (Regex::new(r"\u{00B0}\u{0298}<(.*?)> (.*)").unwrap(), Color::Magenta), // Mefidroniy
(Regex::new(r"<(.*?)> (.*)").unwrap(), Color::Cyan), // clRAC (Regex::new(r"<(.*?)> (.*)").unwrap(), Color::Cyan), // clRAC