@extra-regexp/unescape.min

Unescapes RegExp string for readability.

Usage no npm install needed!

<script type="module">
  import extraRegexpUnescapeMin from 'https://cdn.skypack.dev/@extra-regexp/unescape.min';
</script>

README

Unescapes RegExp string for readability.

This is part of package extra-regexp.

This is browserified, minified version of @extra-regexp/unescape.
It is exported as global variable regexp_unescape.
CDN: unpkg, jsDelivr.

require('extra-regexp');

RegExp.unescape('break\\. fix\\.');
// 'break. fix.'
/* note : double backslashes represent a single backslash */

RegExp.unescape('\\(\\*\\.\\*\\)');
// '(*.*)'

RegExp.unescape('\\\\d \\\\D \\(\\?:\\)');
// '\\d \\D (?:)'


reference

RegExp.unescape(string);
// string: string to unescape
// return -> string 'unescaped string'


references