UNPKG

rsuite

Version:

A suite of react components

7 lines 207 B
'use client'; /** * @description escape Regular_Expressions special_characters '^$.|*+?{\\[()' */ export function getSafeRegExpString(str) { return str.replace(/([\^\$\.\|\*\+\?\{\\\[\(\)])/g, '\\$1'); }