Regex
import { escapeRegExp, matchAll, replaceAllRegex } from '@rtorcato/js-common/regex'
Exports
| Name | Summary |
|---|---|
escapeRegExp | Escapes special regex characters in a string so it can be used in a RegExp. |
matchAll | Returns all matches of a regex pattern in a string. |
replaceAllRegex | Replaces all matches of a regex pattern in a string with a replacement. |
splitByRegex | Splits a string by a regex pattern. |
testRegex | Tests if a string matches a given regex pattern. |