Skip to content

Commit

Permalink
Expand range for command regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill13579 committed Apr 27, 2020
1 parent 53aed5b commit aeaae24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl Handler {
});
let mut states = Vec::new();
let commands = contents.split("\n").map(|v| v.trim().to_owned()).filter(|v| v != "");
let command_matcher = Regex::new(r"^([A-Z]*?)!(?:\[?)(.*?)(?:\]?)\+([0-9.]*)$").unwrap();
let command_matcher = Regex::new(r"^([a-zA-Z_]*?)!(?:\[?)(.*?)(?:\]?)\+([0-9.]*)$").unwrap();
for c in commands {
let matched = command_matcher.captures_iter(&c).next().unwrap();
let cmd_type: String = matched.get(1).unwrap().as_str().to_owned();
Expand Down

0 comments on commit aeaae24

Please sign in to comment.