replace special chars in string

I tried to specify /[^a-zA-Z0-9 ]/g and /[&\/\\#,+()$~%.'":*?<>{}]/g  in replace tile both did not work. 

 

However /s to remove space worked....

Best Answer

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Hi @Yogesh 

     

    How did your regular expressions not work? Is there some anonymized data you can share? Have you played around with a regular expression editor like https://regex101.com/ ? Can you post a screen shot of your tile with the regular expressions in it?

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Hi @Yogesh 

     

    How did your regular expressions not work? Is there some anonymized data you can share? Have you played around with a regular expression editor like https://regex101.com/ ? Can you post a screen shot of your tile with the regular expressions in it?

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Hello @GrantSmith , Thanks for the reply. I used the site regex101.com and found that /g at the end was the issue. Without the /g the regex replace works.