✅ – mzeeshan – 14-02 Dec 28

hello there..... RegExp Question.... i'm beginner in RegExp. i have a variable search that contains a search regex e.g 3023597 i'm using new RegExp(search) bcz search is dynamic error is... when search contains 3023597+++ it throws error Invalid regular expression: /30359+++/: Nothing to repeat but i want +++ there
UU
Unknown User477d ago
F
front-end477d ago
could u tell me how can i replace it...?
UU
Unknown User477d ago
F
front-end477d ago
i know i need to escape every thing that is special in regexp e.g . + ?+ but i dont know how to escape everything
UU
Unknown User477d ago
S
ScriptyChris477d ago
F
front-end477d ago
yes... it is working.... thanks bro...
UU
Unknown User477d ago