
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.
@teclone/regex
Advanced tools
A module that builds on the existing RegExp module, making it easier working with text matching and replacement both in the browser and node environments
Regex is a module that builds on the existing RegExp module, making it easier working with text matching and replacment in JavaScript both in the browser and in Node.JS environment.
Single Browser distributable bundle is located inside dist folder.
npm install @teclone/regex
import { replace } from '@teclone/regex';
let text = 'Is is Is is Is';
console.log(replace('is', 'are', text)); // are are are are are
// respect case (case sensitive)
console.log(replace('is', 'are', text, true)); // Is are Is are Is
// replace only first occurence, case sensitive false
console.log(replace('is', 'are', text, false, 1)); // are is Is is Is
// replace only first 2 occurences, case sensitive false
console.log(replace('is', 'are', text, false, 2)); // are are Is is Is
import { replaceCallback } from '@teclone/regex';
const text = 'He loves her';
console.log(
replaceCallback(
['he', 'she'],
function(matches, count) {
if (matches[0].toLowerCase() === 'he') return 'She';
else {
return 'him';
}
},
text,
),
); // logs She loves him
to reference a captured parameter in replacement text, use the format $:number. e.g $:1, $:2, $:3
import {replace} from '@teclone/regex';
const text = '2222 is the amount';
console.log(
replace(/(\d+)/, '$$:1', text)).toEqual('$2222 is the amount')
);
FAQs
A module that builds on the existing RegExp module, making it easier working with text matching and replacement both in the browser and node environments
We found that @teclone/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
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.