Remove whitespace at the end of text

I have a string that arrives from a webhook but this string has a blank space at the end of the text and I can’t remove it, what do I do?

If you are referring to what you have screenshot, That’s not a white space, it’s an object with a key and value pair

ok, but how i can remove this? because i need to search “Campos do Jordão” on a sheet and not "Campos do Jordão "

If you need to clean a string one day, you can use a Text Parser module with a Regex formula :down_arrow:

\s+$

As you can see here in this example :down_arrow:

Here is the text parser config :down_arrow:

And here is the result :down_arrow:

Everything about Regex is explained in the Advanced Course of Make Academy :slight_smile:

2 Likes

For simplicity, just use the trim() inline function in make com

1 Like

It removes any white space at the begining and end of a string

Welcome to the Make community!

To do this, you can use the built-in function replace — “Replaces the search string with the new string.”

{{ replace (text; search string; replacement string) }}

e.g.:

{{ replace(1.text; "/\s*$/"; emptystring) }}

(copy-paste the above into the field, or type it exactly as shown)

For more information, the function’s documentation can be found in the Help Centre. You should also complete the tutorials in the Make Academy.

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Getting Started

Help Centre Basics

Articles & Videos

@samliew