REGEX_MATCH returns result twice

When the input of the REGEX_MATCH function matches the regex completely it returns the input twice.

input = “12345678”

function:
REGEX_MATCH(input, “[0-9]+”)

expected result:
[“12345678”]

received result:
[“12345678”, “12345678”]

Hi,
it works for me as expected:

image

Are you using a trigger function?

Regards Chris

Hi Chris,

it seems like it was my fault. Actually, I used:
REGEX_MATCH(input, “([0-9]+)”)

but accidentally placed the correct regex in my post.
REGEX_MATCH(input, “[0-9]+”)

If you use the upper regex, it should return the input twice.

Kind Regards,
Oliver

1 Like

Hi Oliver,
I think it’s because you are using the (outer) group brackets. So you got a match and a group match too
I’m using this side when looking for a regex:

image

I can be wrong, so correct me then pls.

Regards Chris

1 Like

Hi Chris,

I used this one https://regexr.com/ and got the following result.
image

Turns out: In this case Tulip treats the regex differently.

Kind Regards,
Oliver.

If you watch the details, you will find the group match as well:

2 Likes