Forum Academy Marketplace Showcase Pricing Features

Regex to extract only non-whitespace characters from an input field

Hello Everyone,

I wonder, if someone has managed to set up a conditional for a button that checks if an input field contains any non-whitespace characters. If it does, the button appears. I have decided to go with a simple RegEx expression “\S+”, but it only captures the first space in an input field. If I begin by adding white spaces and only later add a character, it doesn’t work. I have tried to add “:number of characters” and “:trimmed” but to no avail. So, what you see in the attached screenshot, doesn’t work. Any idea as to what I’m missing?

Many thanks for your time!

Hi there, @fabrizio… if I understand your post correctly (and I know you said you already tried the following operators), but I believe input_Left's value:trimmed:number of characters > 0 could do the trick. I just tested it, and it shows the button when any non-whitespace characters are entered into the input field. Have you already tried that expression?


Dear @mikeloc,

Thank you very much for you help! This works! And I just found out that my first expression is also valid. It just takes one to two seconds for the button to appear. I was expecting a faster response :wink:

1 Like