I’m trying to use the Regex functionality within the Tulip expression editor, but it is not working as expected:

Here's what I am trying to run in Tulip:


With this outcome (spaces, comma, and exclamation mark not removed):

(input: “Hello, World! 123 @#$%^&*()_+”)

(displayDeviceName is shown in the upper box)

Here's the same regex expression run in the console:


And here is the same expression tested at

Am I missing something here or is it not working as expected?


Hey @kellen.linse -

Looks like the main issues you have is that you are including the expression flag (/g) directly within the regex field for this expression function.

Try adding the “g” or “gi” as the optional modifier for your REGEX_MATCH:

regex_replace(@Variable.input , '[^a-zA-Z0-9]', '', 'g')

Hope this helps,

That worked.

Thank you for your time and quick reply!