
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
regexp-cjk
Advanced tools
Generate JavaScript-compatible regular expressions with chinese/jp/zh/cn
Generate JavaScript-compatible regular expressions with chinese/jp/zh/cn
npm install regexp-cjk
version 2.x
allow use regexp event do something u need.
remove useless double pattern
sort pattern class
auto match cjk hanzi/chinese
human pattern class char range [一-十]
=> [一二三四五六七八九十]
import zhRegExp from 'regexp-cjk';
import { zhRegExp, create, isRegExp } from 'regexp-cjk';
new zhRegExp(string);
new zhRegExp(RegExp);
[
/EARTH|亞斯\(アース\)/ig,
'(波庫斯|沃[尔爾]克斯)[亞亚][龙龍]草原',
'[鳞|鱗]王(巢穴|之巢)',
'(魔[像象]|哥雷姆|哥雷魯|GOLEM)(?!\\(?(?:魔[像象]|哥雷姆|GOLEM))',
/(【[^【】\n<>\[\]\{\}]+】[^\n【】<>\[\]\{\}]*)[<\[\{]([ ]*[…?-—\w0-9a-zA-Z\u4E00-\u9FFF][^\n【】<>\[\]\{\}]*)[\]\}>]/gm,
'嫉妒吉尔|懒惰吉尔|怠惰吉尔',
'米娅・艾璐罗德',
`神学+(?:院|校|园)`,
/[一-十]/,
/[壹-拾]/,
`[壹-什]`,
`[洞-勾]`,
///[〇-𠃩]/,
///[𠃩]/,
`[四-七]罗`,
/([《(「『【])([^《(「『【』」》)】\n]{1,5})([』」》)】])/g,
].forEach(function (value, index, array)
{
let r = create(value as any, null, {
//disableZh: true,
});
console.log(r);
});
/EARTH|[亞亚]斯\(アース\)/gi
/(波[庫库]斯|沃[尔爾]克斯)[亞亚][龙龍]草原/
/[鳞|鱗]王(巢穴|之巢)/
/(魔[像象]|哥雷姆|哥雷[魯鲁]|GOLEM)(?!\(?(?:魔[像象]|哥雷姆|GOLEM))/
/(【[^【】\n<>\[\]\{\}]+】[^\n【】<>\[\]\{\}]*)[<\[\{]([ ]*[…?-—\w0-9a-zA-Z\u4E00-\u9FFF][^\n【】<>\[\]\{\}]*)[\]\}>]/gm
/嫉妒吉[尔爾]|[懒嬾]惰吉[尔爾]|怠惰吉[尔爾]/
/米[娅婭]・艾璐[罗羅儸]德/
/神[学學]+(?:院|校|[园園])/
/[一二三四五六七八九十]/
/[壹貳參肆伍陸柒捌玖拾]/
/[壹貳參肆伍陸柒捌玖什]/
/[洞幺两三刀五六拐八勾]/
/[四五六七][罗羅儸]/
/([《(「『【])([^《(「『【』」》)】\n]{1,5})([』」》)】])/g
export interface IApi
{
(str: string, flags?: string, skip?: string): zhRegExp
(str: RegExp, flags?: string, skip?: string): zhRegExp
}
console.log(zhRegExp.support);
export declare const support: {
readonly leftContext: boolean;
readonly rightContext: boolean;
readonly lastParen: boolean;
readonly lastMatch: boolean;
readonly input: boolean;
};
FAQs
Generate JavaScript-compatible regular expressions with chinese/jp/zh/cn
The npm package regexp-cjk receives a total of 1,505 weekly downloads. As such, regexp-cjk popularity was classified as popular.
We found that regexp-cjk 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.