mirror of
https://github.com/FliegendeWurst/tmux-thumbs.git
synced 2024-11-22 04:45:00 +00:00
nicer regexp
This commit is contained in:
parent
5313950597
commit
277685f487
@ -136,9 +136,7 @@ impl<'a> Swapper<'a> {
|
||||
let options = self.executor.execute(params);
|
||||
let lines: Vec<&str> = options.split('\n').collect();
|
||||
|
||||
//let pattern = Regex::new(r#"@thumbs-([\w\-0-9]+)\s+(.+)"#).unwrap();
|
||||
let pattern =
|
||||
Regex::new(r#"@thumbs-([\w\-0-9]+)\s+"?([\w\d\[\{\(\-\+/\\\.,\|=\)\}\]!@#\$%\^&~`:<>\?;'\*]+)"?$"#).unwrap();
|
||||
let pattern = Regex::new(r#"@thumbs-([\w\-0-9]+)\s+"?([^"]+)"?$"#).unwrap();
|
||||
|
||||
let args = lines
|
||||
.iter()
|
||||
|
Loading…
Reference in New Issue
Block a user