javascript-regex-utils

1.1.0 • Public • Published

javascript-regex-utils

js 常用正则方法库,持续添加中...

Installment

npm install javascript-regex-utils --save

Documentation

1. replaceRegexMatchedText

替换正则表达式匹配的文本

Usage

  import { replaceRegexMatchedText } from 'javascript-regex-utils';

  replaceRegexMatchedText('我是中国人${xxxx}', /\${(\w+)}/g, 'allen'); // 我是中国人allen
  replaceRegexMatchedText('我是中国人${name}', /\${(\w+)}/g, {
    name: 'allen',
  }); // 我是中国人allen

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i javascript-regex-utils

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

3.13 kB

Total Files

4

Last publish

Collaborators

  • marksman