Skip to content

asabya/escape_string_regexp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ported from https://github.com/sindresorhus/escape-string-regexp

escape-string-regexp

Build Status

Escape RegExp special characters

Usage

import { escapeStringRegexp } from 'https://raw.githubusercontent.com/Sab94/escape-string-regexp/master/mod.ts'

const  a = escapeStringRegexp('\\ ^ $ * + ? . ( ) | { } [ ]');
console.log(a)

//result: '\\\\ \\^ \\$ \\* \\+ \\? \\. \\( \\) \\| \\{ \\} \\[ \\]'

License

MIT

About

Escape RegExp special characters

Resources

License

Stars

Watchers

Forks

Packages

No packages published