escapeRegexChars

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.string

Escape regex special characters from a string

Params

  1. str*-String

    The string to escape regex characters from

Return

  1. -String

    The escaped string

Example

import { escapeRegexChars } from '@blackbyte/sugar/string';
escapeRegexChars('/hello()'); // => \/hello\(\)

Todo

  • testsnormal