JSPM

match-string

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 98
  • Score
    100M100P100Q86343F
  • License MIT

Package Exports

  • match-string

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (match-string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

match-string

match-string is a javascript function who return a regexp for match a string with all of his accents possible

Installation

you install it with npm :

npm i match-string

Usage

You can include it easly :

ES6

import m from "match-string";

ES5

var m = require("match-string");

Syntaxe

m("test"); // return /t[eèéêë][sß]t/gi
m("test", "i"); // return /t[eèéêë][sß]t/i

var exp = m("test");
const text = "this is a test Test TEST tést tèst";

text.replace(exp, "!$&!"); // retrun "this is a !test! !Test! !TEST! !tést! !tèst!"