node-regexp
New RegExp Style for Node.js
Install
$ npm install node-regexp
API
Methods
var regexp = var re = start'str' // must start str // maybe match str // atleast match 3 times // must match str // should have 1 to 5 // either str1, str2, str3 // capture match // anything match but str // something match but str // match end str // global match ignoreCase // ignore case match multiline // multiple lines match // return a RegExp // return a String
Vars
var regexp = regexpnumber = "[0-9]"regexplower = "[a-z]"regexpupper = "[A-Z]"regexpletter = "[a-zA-Z]"regexptab = "\\t"regexpspace = "\\s"regexpword = "\\w"regexpdigit = "\\d"regexpnewline = "\\n"regexpreturn = "\\r"regexpeol = "(?:(?:\\n)|(?:\\r\\n))"
Demo
var regexp = var re = start'http' ignoreCase re // => truere // => truere // => truere // => falsere // => false