Remove punctuation in a short text field

I’d like to remove all kinds of punctuation in the short text field which I import from the Excel sheet instead of changing it in the Excel sheet. Anyone could help? thanks

Hi @Paul, could you explain what you mean by punctuation? Do you mean particular symbols or spaces? Cheers.

I meant those non-alphabet and non-number strings.

Are you able to provide an example of some text that you see, and what the intended result should be?

德国 :de:-Neuenbürg - Niefern-Öschelbronn - Straubenhardt:集体采购三 (3) 辆 HLF 20**

this is an example of a text formula I created as the name of the record. but I need to remove “:” and “(”,“)” as well as ",。“kind of special characters, so I could use this title name as my Sharepoint file name.

It’s not going to be perfect, but this is your best bet in making it filename friendly as possible:


  • A short text field with the original text (named Short Text in this example)
  • A text formula field with the below code:
    regexReplace({Short Text},[^\w\s.-], )
    This replaces any character that is not alphanumeric, a whitespace, an underscore, a space, or a hyphen.

You can then use the Text Formula field as reference for your SharePoint file name.
As you can see in the below example, Knack doesn’t like to store the emoji.

I hope this helps!

Thanks a lot. I tried to use this before. However, I need to keep the Chinese characters in the text. I don’t think it could be done because the program does not recognize Chinese characters as an alphabet. really can’t figure out how to do it. maybe just remove 。,!“” those unacceptable characters as a file name.

Maybe this?

regexReplace({Short Text},[\ / : ? “ ” < > \u0022], )

The \u0022 is in place of ", which can’t be specified in the text formula editor without error.

Feel free to add any other symbols within the [ ] part.

thank you so much. I used zapier format tool to clean those characters, which is free of zaps and works great.

1 Like