{"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"keywords":["ip","ipv6","ipv4","regex","regexp","re","match","test","find","text","pattern","internet","protocol","address","validate"],"dist-tags":{"latest":"2.1.0"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"description":"Regular expression for matching IP addresses (IPv4 & IPv6)","readme":"# ip-regex [![Build Status](https://travis-ci.org/sindresorhus/ip-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ip-regex)\n\n> Regular expression for matching IP addresses\n\n\n## Install\n\n```\n$ npm install --save ip-regex\n```\n\n\n## Usage\n\n```js\nconst ipRegex = require('ip-regex');\n\n// Contains an IP address?\nipRegex().test('unicorn 192.168.0.1');\n//=> true\n\n// Is an IP address?\nipRegex({exact: true}).test('unicorn 192.168.0.1');\n//=> false\n\nipRegex.v6({exact: true}).test('1:2:3:4:5:6:7:8');\n//=> true\n\n'unicorn 192.168.0.1 cake 1:2:3:4:5:6:7:8 rainbow'.match(ipRegex());\n//=> ['192.168.0.1', '1:2:3:4:5:6:7:8']\n```\n\n\n## API\n\n### ipRegex([options])\n\nReturns a regex for matching both IPv4 and IPv6.\n\n### ipRegex.v4([options])\n\nReturns a regex for matching IPv4.\n\n### ipRegex.v6([options])\n\nReturns a regex for matching IPv6.\n\n#### options.exact\n\nType: `boolean`<br>\nDefault: `false` *(Matches any IP address in a string)*\n\nOnly match an exact string. Useful with `RegExp#test()` to check if a string is an IP address.\n\n\n## Related\n\n- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","repository":{"type":"git","url":"git+https://github.com/sindresorhus/ip-regex.git"},"users":{"mojaray2k":true,"rocket0191":true,"xinwangwang":true},"bugs":{"url":"https://github.com/sindresorhus/ip-regex/issues"},"license":"MIT","versions":{"1.0.0":{"name":"ip-regex","version":"1.0.0","description":"Regular expression for matching IP addresses","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/ip-regex"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["text","regex","regexp","re","match","test","find","pattern","ip","internet","protocol","address","validate"],"devDependencies":{"ava":"0.0.4"},"bugs":{"url":"https://github.com/sindresorhus/ip-regex/issues"},"homepage":"https://github.com/sindresorhus/ip-regex","_id":"ip-regex@1.0.0","_shasum":"ea90b7e1951898d36eecd24f2ab6942347b4ab28","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"ea90b7e1951898d36eecd24f2ab6942347b4ab28","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ip-regex/-/ip-regex-1.0.0.tgz"},"directories":{}},"1.0.1":{"name":"ip-regex","version":"1.0.1","description":"Regular expression for matching IP addresses","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/ip-regex"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["text","regex","regexp","re","match","test","find","pattern","ip","internet","protocol","address","validate"],"devDependencies":{"ava":"0.0.4"},"gitHead":"1844317d3c1adaa8848e893269fc599a54b0057e","bugs":{"url":"https://github.com/sindresorhus/ip-regex/issues"},"homepage":"https://github.com/sindresorhus/ip-regex","_id":"ip-regex@1.0.1","_shasum":"3f1da464e47290591023a70617e45361b41123f7","_from":".","_npmVersion":"2.1.5","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"3f1da464e47290591023a70617e45361b41123f7","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ip-regex/-/ip-regex-1.0.1.tgz"},"directories":{}},"1.0.2":{"name":"ip-regex","version":"1.0.2","description":"Regular expression for matching IP addresses","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/ip-regex"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["text","regex","regexp","re","match","test","find","pattern","ip","internet","protocol","address","validate"],"devDependencies":{"ava":"0.0.4"},"gitHead":"077df3268bbad242f5b7de42b97e6d8b6165bb76","bugs":{"url":"https://github.com/sindresorhus/ip-regex/issues"},"homepage":"https://github.com/sindresorhus/ip-regex","_id":"ip-regex@1.0.2","_shasum":"1e7daad2c2d0c268729ecca91f8ec463ad58f56b","_from":".","_npmVersion":"2.1.5","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"1e7daad2c2d0c268729ecca91f8ec463ad58f56b","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ip-regex/-/ip-regex-1.0.2.tgz"},"directories":{}},"1.0.3":{"name":"ip-regex","version":"1.0.3","description":"Regular expression for matching IP addresses","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/ip-regex"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["text","regex","regexp","re","match","test","find","pattern","ip","internet","protocol","address","validate"],"devDependencies":{"ava":"0.0.4"},"gitHead":"4237cf39da0e1b2ea883bc65bde2b69921d78ceb","bugs":{"url":"https://github.com/sindresorhus/ip-regex/issues"},"homepage":"https://github.com/sindresorhus/ip-regex","_id":"ip-regex@1.0.3","_shasum":"dc589076f659f419c222039a33316f1c7387effd","_from":".","_npmVersion":"2.5.0","_nodeVersion":"0.12.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"dc589076f659f419c222039a33316f1c7387effd","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ip-regex/-/ip-regex-1.0.3.tgz"},"directories":{}},"2.0.0":{"name":"ip-regex","version":"2.0.0","description":"Regular expression for matching IP addresses (IPv4 & IPv6)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/ip-regex.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["ip","ipv6","ipv4","regex","regexp","re","match","test","find","text","pattern","internet","protocol","address","validate"],"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"425bb476fa3c1d73507047fda1586c719ae23641","bugs":{"url":"https://github.com/sindresorhus/ip-regex/issues"},"homepage":"https://github.com/sindresorhus/ip-regex#readme","_id":"ip-regex@2.0.0","_shasum":"913a92db023723d6d1a38b874c543893165b24ff","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"913a92db023723d6d1a38b874c543893165b24ff","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ip-regex/-/ip-regex-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ip-regex-2.0.0.tgz_1483952683792_0.4461984606459737"},"directories":{}},"2.1.0":{"name":"ip-regex","version":"2.1.0","description":"Regular expression for matching IP addresses (IPv4 & IPv6)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/ip-regex.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["ip","ipv6","ipv4","regex","regexp","re","match","test","find","text","pattern","internet","protocol","address","validate"],"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"3f6478e54773d2ad79de39da4f4e1b9df34fa9a7","bugs":{"url":"https://github.com/sindresorhus/ip-regex/issues"},"homepage":"https://github.com/sindresorhus/ip-regex#readme","_id":"ip-regex@2.1.0","_shasum":"fa78bf5d2e6913c911ce9f819ee5146bb6d844e9","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"fa78bf5d2e6913c911ce9f819ee5146bb6d844e9","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/ip-regex/-/ip-regex-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ip-regex-2.1.0.tgz_1489226167327_0.37895454838871956"},"directories":{}}},"name":"ip-regex","time":{"modified":"2017-04-17T03:32:16.027Z","created":"2014-09-06T11:39:45.351Z","1.0.0":"2014-09-06T11:39:45.351Z","1.0.1":"2014-11-29T16:20:14.443Z","1.0.2":"2014-12-10T14:53:56.499Z","1.0.3":"2015-02-09T07:23:47.217Z","2.0.0":"2017-01-09T09:04:44.010Z","2.1.0":"2017-03-11T09:56:09.108Z"},"readmeFilename":"readme.md","homepage":"https://github.com/sindresorhus/ip-regex#readme"}