Skip to content

Commit

Permalink
feat: change regular expresion
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelAHM committed Dec 30, 2024
1 parent f2ea4df commit 9defd8d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public final class Ipv4Resource extends IpInterval<Ipv4Resource> implements Comp
public static final Ipv4Resource MAX_RANGE = new Ipv4Resource(MINIMUM_NUMBER, MAXIMUM_NUMBER);

private static final Splitter SPLIT_ON_DOT = Splitter.on('.');
private static final Pattern OCTET_PATTERN = Pattern.compile("^(?:[1-9][0-9]*|0)(?:-[1-9][0-9]*|0)*$");
private static final Pattern OCTET_PATTERN = Pattern.compile("^(?:[1-9][0-9]*|0)(?:-(?:[1-9][0-9]*|0))?$");

private final int begin;
private final int end;
Expand Down

0 comments on commit 9defd8d

Please sign in to comment.