File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ const IPv6AddressRegExp = new RegExp('^(' +
42
42
`(?:${ IPv6SegmentFormat } :){2}(?:(:${ IPv6SegmentFormat } ){0,3}:${ IPv4AddressFormat } |(:${ IPv6SegmentFormat } ){1,5}|:)|` +
43
43
`(?:${ IPv6SegmentFormat } :){1}(?:(:${ IPv6SegmentFormat } ){0,4}:${ IPv4AddressFormat } |(:${ IPv6SegmentFormat } ){1,6}|:)|` +
44
44
`(?::((?::${ IPv6SegmentFormat } ){0,5}:${ IPv4AddressFormat } |(?::${ IPv6SegmentFormat } ){1,7}|:))` +
45
- ')(%[0-9a-zA-Z-.: ]{1,})?$' ) ;
45
+ ')(%[0-9a-zA-Z. ]{1,})?$' ) ;
46
46
47
47
export default function isIP ( ipAddress , options = { } ) {
48
48
assertString ( ipAddress ) ;
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ describe('isIP', () => {
70
70
'2001:db8:0000:1:1:1:1::1' ,
71
71
'0:0:0:0:0:0:ffff:127.0.0.1' ,
72
72
'0:0:0:0:ffff:127.0.0.1' ,
73
+ 'BC:e4d5:c:e7b9::%40i0nccymtl9cwfKo.5vaeXLSGRMe:EDh2qs5wkhnPws5xQKqafjfAMm6wGFCJ.bVFsZfb' ,
74
+ '1dC:0DF8:62D:3AC::%KTatXocjaFVioS0RTNQl4mA.V151o0RSy.JIu-D-D8.d3171ZWsSJ7PK4YjkJCRN0F' ,
73
75
] ,
74
76
} ) ;
75
77
You can’t perform that action at this time.
0 commit comments