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

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

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