
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-regexp
Advanced tools
New RegExp Style for Node.js
$ npm install node-regexp
var regexp = require('node-regexp')
var re = regexp().
.start('str') // must start str
.maybe('str') // maybe match str
.atleast(3) // atleast match 3 times
.must('str') // must match str
.has(1, 5) // should have 1 to 5
.either('str1', 'str2', 'str3') // either str1, str2, str3
.find('str') // capture match
.anythingBut('str') // anything match but str
.somethingBut('str') // something match but str
.end('str') // match end str
.global() // global match
.ignoreCase() // ignore case match
.multiline() // multiple lines match
.toRegExp() // return a RegExp
.toString() // return a String
var regexp = require('node-regexp')
regexp.number = "[0-9]"
regexp.lower = "[a-z]"
regexp.upper = "[A-Z]"
regexp.letter = "[a-zA-Z]"
regexp.tab = "\\t"
regexp.space = "\\s"
regexp.word = "\\w"
regexp.digit = "\\d"
regexp.newline = "\\n"
regexp.return = "\\r"
regexp.eol = "(?:(?:\\n)|(?:\\r\\n))"
var regexp = require('node-regexp')
var re = regexp()
.start('http')
.maybe('s')
.must('://')
.maybe('WWW.')
.somethingBut(regexp.space)
.end('.com')
.ignoreCase()
.toRegExp()
re.test("http://qq.com") // => true
re.test("http://www.qq.com") // => true
re.test("https://www.qq.com") // => true
re.test("http://www.qqcom") // => false
re.test("https://www.qq.net") // => false
FAQs
New RegExp Style for Node.js
We found that node-regexp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.