Comparing version 0.0.1 to 0.0.2
@@ -6,14 +6,10 @@ /* | ||
// exports.url = /[a-zA-z]+:\/\/[^\s]*/; | ||
exports.url = /^(http|https|ftp)+:\/\/\S+/; | ||
exports.url = /^(http|https|ftp|)+:\/\/\S+/; | ||
exports.http = /^http:\/\/\S+/; | ||
exports.https = /^http:\/\/\S+/; | ||
exports.https = /^https:\/\/\S+/; | ||
exports.email = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/; | ||
// exports.username = /^[a-zA-Z][a-zA-Z0-9_]{4,15}$/; | ||
exports.username = /^[a-z0-9_-]{3,18}$/; | ||
@@ -24,1 +20,19 @@ | ||
exports.chinese = /[\u4e00-\u9fa5]/; | ||
exports.contentType = /content-type/i; | ||
exports.charset = /charset=('|")?([a-zA-Z-0-9-_]+)('|")?/i; | ||
exports.utf8 = /utf-?8/i; | ||
exports.matchCharset = function (str) { | ||
var match = str.match(exports.charset); | ||
return match ? match[2] : null; | ||
} | ||
exports.matchContentType = function (str) { | ||
var match = str.match(exports.contentType); | ||
return match ? match[0] : null; | ||
} |
{ | ||
"name": "reges", | ||
"description": "A collection of regular expressions", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": "Shallker <imshallker@gmail.com>", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4008
8
116