
Security News
Node.js Homepage Adds Paid Support Link, Prompting Contributor Pushback
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
regexp-support
Advanced tools
check RegExp ( regular expressions ) support
npm install regexp-support
allow u check support on other RegExp base class
hasSupportFlag(flag: string, RegExpClass?: typeof RegExp, skipPatternCheck?: boolean): boolean
testFlag(flag: string, RegExpClass?: typeof RegExp, flagsPattern?): boolean
RegExpClass
can be Object with create
, for some class can't create by new
export interface ICreateRegExp
{
create(pattern: string, flag?: string, ...argv)
}
import support from 'regexp-support';
console.log(support);
aa(?=bb)
aa(?!bb)
(?<=\$)foo
const RE_DOLLAR_PREFIX = /(?<=\\$)foo/g;
'$foo %foo foo'.replace(RE_DOLLAR_PREFIX, 'bar'); // => '$bar %foo foo'
(?<!\$)foo
const RE_NO_DOLLAR_PREFIX = /(?<!\\$)foo/g;
'$foo %foo foo'.replace(RE_NO_DOLLAR_PREFIX, 'bar'); // => '$foo %bar bar'
{ flags:
{ multiline: true,
m: true,
global: true,
g: true,
ignoreCase: true,
i: true,
sticky: true,
y: true,
unicode: true,
u: true,
dotAll: true,
s: true,
freeSpacing: false,
x: false,
n: false },
flagsAll: { g: true, i: true, m: true, s: true, u: true, y: true },
pattern:
{ namedCapturingGroups: true,
namedCapturingGroupsUnicode: true,
namedCapturingGroupsEmoji: false,
namedCapturingGroupsBackreference: true,
namedCapturingGroupsDuplicate: false,
lookAheadPositive: true,
lookAheadNegative: true,
lookBehindPositive: true,
lookBehindNegative: true },
hasFlagsProp: true,
nativeFlags: 'gimsuy' }
by test on RunKit
{ flags:
{ multiline: true,
m: true,
global: true,
g: true,
ignoreCase: true,
i: true,
sticky: true,
y: true,
unicode: true,
u: true,
dotAll: true,
s: true,
freeSpacing: false,
x: false,
n: false },
flagsAll: { g: true, i: true, m: true, s: true, u: true, y: true },
pattern:
{ namedCapturingGroups: false,
namedCapturingGroupsUnicode: false,
namedCapturingGroupsEmoji: false } }
by test on RunKit
{ flags:
{ multiline: true,
m: true,
global: true,
g: true,
ignoreCase: true,
i: true,
sticky: true,
y: true,
unicode: true,
u: true,
dotAll: true,
s: true,
freeSpacing: false,
x: false,
n: false },
flagsAll: { g: true, i: true, m: true, s: true, u: true, y: true },
pattern:
{ namedCapturingGroups: false,
namedCapturingGroupsUnicode: false,
namedCapturingGroupsEmoji: false } }
FAQs
check RegExp ( regular expressions ) support
The npm package regexp-support receives a total of 2,884 weekly downloads. As such, regexp-support popularity was classified as popular.
We found that regexp-support demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.
Research
Security News
The Socket Research Team investigates a malicious Python typosquat of a popular password library that forces Windows shutdowns when input is incorrect.