Hi guys,
I'm trying to use the Regex_Replace action but isn't working.
I want to remove all the non numeric characters of a string. The pattern that I'm using is "/[^0-9]/g" and replace "".
What I'm doing wrong?
I'm using the SS version 10.0.1008.0.
Thanks in advance.
Kind Regards,
Diogo Miguel
Hi Diogo,
try:
SyntaxEditor Code Snippet
"[0-9]+"
Hi Thiago
Thanks for your feedback.
I tried your pattern but its also not working. I think that its a bug of the version of the platform we are using.
Thats weird...
In my test, i did this steps:
1 - I created an input for digit a text and associate a variable called Txt;
2 - I created an expression showing an another variable called TextRegex;
3 - I created a button called an server action. In this action i have a regex_replece, with:
Text: My variable called Txt; Pattern: "[0-9]+"; Replace: ""And then i have an assign: The variable TextRegex = Regex_Replace.Result.
Maybe these steps can help you.
I solved with the following pattern:
"/[^0-9]/g"
Thanks for your help.
Regards,
Diogo Miguel wrote:
Great! Tnks for sharing your solution.
I am trying to using with flag "g" but it is not working.