I don't like it but it gets the job done

This commit is contained in:
Peter Bartyik 2020-09-03 15:58:36 +02:00
parent 50c9a7602c
commit 5313950597

View File

@ -136,7 +136,9 @@ impl<'a> Swapper<'a> {
let options = self.executor.execute(params); let options = self.executor.execute(params);
let lines: Vec<&str> = options.split('\n').collect(); 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+(.+)"#).unwrap();
let pattern =
Regex::new(r#"@thumbs-([\w\-0-9]+)\s+"?([\w\d\[\{\(\-\+/\\\.,\|=\)\}\]!@#\$%\^&~`:<>\?;'\*]+)"?$"#).unwrap();
let args = lines let args = lines
.iter() .iter()