You now have until September 15th to submit your use case or success story to the 2022 Dataiku Frontrunner Awards!ENTER YOUR SUBMISSION

Issue with regex + arrayLen + match (min. 6 digits in string)

Solved!
ebbingcasa
Level 3
Issue with regex + arrayLen + match (min. 6 digits in string)

Hi everyone,

why does the following formula throw a 0 for an array value like test123456?

arrayLen(match(column,".*\d{6}([\?#].*)?$"))

The regex works fine as far as I can tell.

Thanks!

0 Kudos
1 Solution
fchataigner2
Dataiker
Dataiker

Hi,

the the backslash of the `\d` character class must be escaped. So you need ".*\\d{6}([\\?#].*)?$"

View solution in original post

2 Replies
fchataigner2
Dataiker
Dataiker

Hi,

the the backslash of the `\d` character class must be escaped. So you need ".*\\d{6}([\\?#].*)?$"

ebbingcasa
Level 3
Author

Makes sense, thank you!

0 Kudos

Labels

?
Labels (1)

Setup info

?
Tags (1)
A banner prompting to get Dataiku