Awesome Lists

escape-string-regexp

by sindresorhus

JavaScriptpushed over 2 years ago

Escape RegExp special characters

AI summary

RegExp escape tool

Escapes special characters in regular expressions to ensure safe string insertion

stars
584
forks
54
watching
14
awesome list
1
View on GitHub

Embed the badge

Show how many awesome lists link to your project. The count updates automatically.

Awesome Lists badge
Markdown
[![Awesome Lists Badge](https://awesome.facts.dev/shield/sindresorhus/escape-string-regexp/links.svg)](https://awesome.facts.dev/awesome/sindresorhus/escape-string-regexp)
HTML
<a href="https://awesome.facts.dev/awesome/sindresorhus/escape-string-regexp"><img src="https://awesome.facts.dev/shield/sindresorhus/escape-string-regexp/links.svg" alt="Awesome Lists Badge" /></a>
Image URL
https://awesome.facts.dev/shield/sindresorhus/escape-string-regexp/links.svg

Add a GitHub project

Missing a project or an awesome list? Paste its GitHub URL and we fetch it right away.