Skip to content

Commit

Permalink
- Better regex (fix for group)
Browse files Browse the repository at this point in the history
  • Loading branch information
CoocooFroggy committed May 4, 2021
1 parent 331fc67 commit c0a7424
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/MainMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,17 @@ public MainMenu() {
Matcher blobMatcher = blobPattern.matcher(blobName);
String blobBuild = null;
if (blobMatcher.find()) {
System.out.println("Blob build is " + blobMatcher.group(1));
blobBuild = blobMatcher.group(1);
// System.out.println("Blob build is " + blobMatcher.group(0));
blobBuild = blobMatcher.group(0);
}

//If IPSW has a build name in it
Pattern ipswPattern = Pattern.compile("(?<=_|-)[A-Z0-9]{5,10}[a-z]?(?=_|-)");
Matcher ipswMatcher = ipswPattern.matcher(targetIpswName);
String targetIpswBuild = null;
if (ipswMatcher.find()) {
System.out.println("IPSW build is " + ipswMatcher.group(1));
targetIpswBuild = ipswMatcher.group(1);
// System.out.println("IPSW build is " + ipswMatcher.group(0));
targetIpswBuild = ipswMatcher.group(0);
}

//If they're different
Expand Down

0 comments on commit c0a7424

Please sign in to comment.