✅ – 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 +++
there8 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
could u tell me how can i replace it...?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
i know i need to escape every thing that is special in regexp e.g
. + ?+
but i dont know how to escape everythingUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
MDN has a neat regex excaping snippet
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
yes... it is working....
thanks bro...
This question has an answer! Thank you for helping 😄
If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1057659924668223488
This thread hasn’t had any activity in 12 hours, so it’s now locked.
Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1057659924668223488