Skip to content

Commit

Permalink
fix: improve regex (#6917)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong authored Aug 26, 2024
1 parent e090d40 commit ccc151a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public final void parseVersion(String version) {
versionParts = new ArrayList<>();
if (version != null) {
final Pattern rx = Pattern
.compile("(\\d+[a-z]{1,3}$|[a-z]{1,3}[_-]?\\d+|\\d+|(rc|release|snapshot|beta|alpha)$)",
.compile("(\\d{1,100}[a-z]{1,3}$|[a-z]{1,3}[_-]?\\d{1,100}|\\d{1,100}|(rc|release|snapshot|beta|alpha)$)",
Pattern.CASE_INSENSITIVE);
final Matcher matcher = rx.matcher(version.toLowerCase());
while (matcher.find()) {
Expand Down

0 comments on commit ccc151a

Please sign in to comment.