RegEx on server side scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 05:29 AM
Hello,
Need to write script in server side to replace / or \ with empty space.
I found below in community:
The SNC.Regex API is not available for scoped applications. For scoped applications, remove the SNC.Regex API and use standard JavaScript regular expressions.
We are using scoped applications, in that case how to achieve this?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 05:39 AM
Hi ,
YourString.replace(/\//g,"");
Thanks
Chandu Telu
Please Mark ✅ Correct/helpful, if applicable,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 05:40 AM
I may have multiple \ or /
can I use replaceAll?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 05:44 AM
The example had everything
text.replace(/\//g, " ");
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2022 11:59 AM
Hey
Didn't hear back on this.
Is your issue resolved? If yes, feel free to mark helpful/correct, so it will be helpful for others looking for similar query.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2022 06:11 AM
Hi Dharani,
Did you try my example ?? it should work - Can you mark my answer is correct if answer your question so it will helpful for others
Thanks
Chandu Telu
Please Mark ✅ Correct/helpful, if applicable,