regexp_utils

1.0.7 • Public • Published

RegExp utils##

Add powerfull and user friendly methods to RegExp javascript object. You'll never be annoyed of RegExp now ;)

Note: full documentation included into the js file

RegExp.quote(string) : escape special RegExp chars from a string

RegExp.prototype.match(string) : returns a RegExpMatch.

RegExpMatch : matchString : the matched string position : object containing the start and end index of the match variables : array containing the variables obtained for this match, if variable is undefined, value will be null

RegExp.prototype.matchAll(string) : returns all matches.

RegExp.prototype.replace(string, replacement): replace parts into a string. if replacement is a function, it will get a RegExpMatch as parameter.

Readme

Keywords

none

Package Sidebar

Install

npm i regexp_utils

Weekly Downloads

5

Version

1.0.7

License

ISC

Last publish

Collaborators

  • lifaon74