mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
8 lines
201 B
TypeScript
8 lines
201 B
TypeScript
import ipRegex = require('ip-regex');
|
|
|
|
ipRegex().test('unicorn 192.168.0.1');
|
|
|
|
ipRegex({exact: true}).test('unicorn 192.168.0.1');
|
|
|
|
'unicorn 192.168.0.1 cake 1:2:3:4:5:6:7:8 rainbow'.match(ipRegex());
|