RegEx on server side scripts

dharani2607
Tera Contributor

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

11 REPLIES 11

Hi ,

YourString.replace(/\//g,"");

Thanks
Chandu Telu
Please Mark Correct/helpful, if applicable,

I may have multiple \ or /

can I use replaceAll?

@dharani2607 

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 🙂

Best Regards
Aman Kumar

Hey @dharani2607 

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.

 

Best Regards
Aman Kumar

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,