Hi everyone, I am troubling with removing special character from user input box. I have "name" input box in form. If the user enter their name with something like this "Kyaw, Kyaw"  I want to remove "," from name. How should i do that?

Solution

Hi,

You might want to do this in the other way around, if the user inserts invalid characters , they should get a error saying that special characters are not allowed. The validation would require something like a regex that would only allow letters, spaces and numbers, if it makes sense to have them. 

In case you really want to remove those characters, you would need to use Replace function but you would probably end up building this, that doesn't look pretty. 

or you can try using Regex_Replace from Text extension

Gabriel

Solution

Hi,

You can use this component from forge: 

Cheers,
Nuno Verdasca

Gabriel Cardoso wrote:

Hi,

You might want to do this in the other way around, if the user inserts invalid characters , they should get a error saying that special characters are not allowed. The validation would require something like a regex that would only allow letters, spaces and numbers, if it makes sense to have them. 

In case you really want to remove those characters, you would need to use Replace function but you would probably end up building this, that doesn't look pretty. 

or you can try using Regex_Replace from Text extension

Gabriel


Very thank you Gabriel Cardoso, I use the regex_replace as us described in picture and it really works!

How about replacing forward slash in the string? I have tried Replace function with  escape sequence like "\ /" but no luck.