mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2026-05-01 02:59:09 +00:00
initial commit
This commit is contained in:
8
src/parser.rs
Normal file
8
src/parser.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
use regex::Regex;
|
||||
|
||||
pub fn ParseLine(line: &str) -> Option<String> {
|
||||
let regex = Regex::new(r"(?m)^\[\+\] UID.... (.*)$").unwrap();
|
||||
let result = regex.captures(line);
|
||||
|
||||
result.map(|c| c.get(1).unwrap().as_str().to_owned())
|
||||
}
|
||||
Reference in New Issue
Block a user