HEX
Server: LiteSpeed
System: Linux server161.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: imagzxcb (1058)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //home/imagzxcb/public_html/db127a/escape-string-regexp.tar
readme.md000064400000001050152045560420006322 0ustar00# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)

> Escape RegExp special characters


## Install

```
$ npm install --save escape-string-regexp
```


## Usage

```js
const escapeStringRegexp = require('escape-string-regexp');

const escapedString = escapeStringRegexp('how much $ for a unicorn?');
//=> 'how much \$ for a unicorn\?'

new RegExp(escapedString);
```


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)
license000064400000002137152045560420006117 0ustar00The MIT License (MIT)

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
package.json000064400000003754152045560420007046 0ustar00{
  "_from": "escape-string-regexp@^1.0.5",
  "_id": "escape-string-regexp@1.0.5",
  "_inBundle": false,
  "_integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
  "_location": "/escape-string-regexp",
  "_phantomChildren": {},
  "_requested": {
    "type": "range",
    "registry": true,
    "raw": "escape-string-regexp@^1.0.5",
    "name": "escape-string-regexp",
    "escapedName": "escape-string-regexp",
    "rawSpec": "^1.0.5",
    "saveSpec": null,
    "fetchSpec": "^1.0.5"
  },
  "_requiredBy": [
    "/babel-code-frame/chalk",
    "/chalk",
    "/figures",
    "/tap-mocha-reporter"
  ],
  "_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
  "_shasum": "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4",
  "_spec": "escape-string-regexp@^1.0.5",
  "_where": "/Users/rebecca/code/npm/node_modules/chalk",
  "author": {
    "name": "Sindre Sorhus",
    "email": "sindresorhus@gmail.com",
    "url": "sindresorhus.com"
  },
  "bugs": {
    "url": "https://github.com/sindresorhus/escape-string-regexp/issues"
  },
  "bundleDependencies": false,
  "deprecated": false,
  "description": "Escape RegExp special characters",
  "devDependencies": {
    "ava": "*",
    "xo": "*"
  },
  "engines": {
    "node": ">=0.8.0"
  },
  "files": [
    "index.js"
  ],
  "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme",
  "keywords": [
    "escape",
    "regex",
    "regexp",
    "re",
    "regular",
    "expression",
    "string",
    "str",
    "special",
    "characters"
  ],
  "license": "MIT",
  "maintainers": [
    {
      "name": "Sindre Sorhus",
      "email": "sindresorhus@gmail.com",
      "url": "sindresorhus.com"
    },
    {
      "name": "Joshua Boy Nicolai Appelman",
      "email": "joshua@jbna.nl",
      "url": "jbna.nl"
    }
  ],
  "name": "escape-string-regexp",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/sindresorhus/escape-string-regexp.git"
  },
  "scripts": {
    "test": "xo && ava"
  },
  "version": "1.0.5"
}
index.js000064400000000342152045560420006213 0ustar00'use strict';

var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;

module.exports = function (str) {
	if (typeof str !== 'string') {
		throw new TypeError('Expected a string');
	}

	return str.replace(matchOperatorsRe, '\\$&');
};