How to exclude Special characters " / \ [ ] : ; | = , + * ? < >
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 09:18 PM
Hi
I have a single line text variable and in that I want to exclude " / \ [ ] : ; | = , + * ? < > all this special character.
Could you please help me with it?What should be the RegEx for it?
Thank you!
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 11:06 PM
Hi @Ashwini Jadhao ,
Did this not help?
string = string.replace(/[&\/\\#,+()$~%.'":*?<>{}]/g, '');
Thanks,
Danish
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 11:10 PM
no
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 11:52 PM
Hi,
/[\/\\,+'"|:;=*?<>\]\[/]/g
above regex is working for me.
Thank you!