Function `contains` using using Regex

There is a workaround to use the IML function contains(text; search string) with a Regex.

You will need to use replace() with contains like the example:

image

:information_source: The #NUM# string/code should be a string that is not present in the original string.

{{contains(replace("Hello World"; "/(Hello)/g"; "#NUM#"); "#NUM#")}}

Reference: Tools > IML Functions: contains() - search with regex | Requests | Integromat

Sorry, might I ask you to elaborate on the #NUM# param?

For instance, I need to use contain() in the following manner (pretending it parses regex…):

contains(/topic/i) - that is, case insensitive “topic”. Thanks for the clarification.

Thanks for the patience in waiting my reply.

As far the string you’re searching doesn’t exist, you can replace with any you might want.

Using your example:

{{contains(replace("My string with topic"; "/topic/i"; "##STRING_EXISTS##"); "##STRING_EXISTS##")}}

In a scenario:

blueprint_function-contains-using-using-regex.json (14.7 KB)

1 Like