
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.
babel-plugin-utf-8-regex
Advanced tools
transforms regexes like /\p{Letter}/ into working js regexes
Transforms a regular expression like /^\p{Cyrillic}+$/
to /^[Ѐ-҄҇-ԧᴫᵸⷠ-ⷿꙀ-ꚗꚟ]+$/
.
This Plugin was inspired by the unicode addon of xregexp. The list of possible types are explained here or can be found in the code. The most useful probably is \p{L}
or its alias \p{Letter}
which indicates any letter in any alphabet.
It also works with negations: either \P{L}
or \p{^L}
.
\p{TYPE}
into [TYPE-RANGES]
. This means that regular expressions like /[\p{Arabic}\p{Greek}]/
or /[^0-9\p{White_Space}]/
won't be correctly translated.So either commit a pull request or use something like /(\p{Arabic}|\p{Greek})/
for now.
npm install babel-plugin-utf-8-regex
Node API:
require("babel").transform("code", {
plugins: ["babel-plugin-utf-8-regex"]
});
CLI:
babel --plugins babel-plugin-utf-8-regex script.js
babelrc:
{
"plugins": ["babel-plugin-utf-8-regex"]
}
Contributions are more than welcome!
Clone this repo, hack around, add your tests and hit npm test
.
/\p{L}-\p{L}/
would be translated to something like var regexTypes = require("regexTypes"); [..] new RegExp(regexTypes.L+"-"+regexTypes.L)
FAQs
transforms regexes like /\p{Letter}/ into working js regexes
The npm package babel-plugin-utf-8-regex receives a total of 23 weekly downloads. As such, babel-plugin-utf-8-regex popularity was classified as not popular.
We found that babel-plugin-utf-8-regex 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
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.