Skip to content

Commit

Permalink
Make java regex work for single digit versions
Browse files Browse the repository at this point in the history
whoops
  • Loading branch information
Scotsguy committed Feb 15, 2020
1 parent e663674 commit 1c6504f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parsers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fn multimc_in_onedrive_managed_folder(log: &str) -> Option<(&str, String)> {
fn major_java_version(log: &str) -> Option<(&str, String)> {
lazy_static! {
static ref RE: Regex =
Regex::new(r"Java is version (1.)??(?P<ver>[1-9][0-9])+\..+,").unwrap();
Regex::new(r"Java is version (1.)??(?P<ver>[1-9][0-9]?)+\..+,").unwrap();
}
match RE.captures(log) {
Some(capture) if capture.name("ver")?.as_str() == "8" => None,
Expand Down

0 comments on commit 1c6504f

Please sign in to comment.