
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
issue-regex
Advanced tools
Regular expression for matching issue references
npm install issue-regex
import issueRegex from 'issue-regex';
'Fixes #143 and avajs/ava#1023'.match(issueRegex());
//=> ['#143', 'avajs/ava#1023']
Organization name, repository name, and issue number are also available individually in capturing groups 1-3, or named groups organization
, repository
, and issueNumber
:
issueRegex().exec('Fixes avajs/ava#1023');
/*
[
'avajs/ava#1023',
'avajs',
'ava',
'1023',
index: 6,
input: 'Fixes avajs/ava#1023',
groups: {
organization: 'avajs',
repository: 'ava',
issueNumber: '1023'
}
]
*/
Returns a RegExp
for matching issue references.
Type: object
Support for references like GH-123
can be added manually. Adding a prefix will still match the #-based references:
import issueRegex from 'issue-regex';
issueRegex({additionalPrefix: 'GH-'}).exec('GH-123');
//=> ['GH-123', 'GH-', '123']
'Fixes GH-143 and avajs/ava#1023'.match(issueRegex({additionalPrefix: 'GH-'}));
//=> ['GH-143', 'avajs/ava#1023']
[!NOTE]
additionalPrefix
is added unescaped to the regex, keep it simple.
If you run the regex against untrusted user input in a server context, you should give it a timeout.
I do not consider ReDoS a valid vulnerability for this package.
FAQs
Regular expression for matching issue references
The npm package issue-regex receives a total of 208,578 weekly downloads. As such, issue-regex popularity was classified as popular.
We found that issue-regex demonstrated a healthy version release cadence and project activity because the last version was released less than 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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.