String Manipulation with regex wildcard search

Hi

I’m having trouble getting the correct true/false result with a regex wildcard search.

Column A has the following strings. And I want to get a true result if the string contains numbers and the number contain 9-11 digits.

I’m using this regex expression with string manipulation and getting this result.

4000010000 (true)
3100430000 (true)
ifølge aftale 3100010000 med per (false)
ifølge aftale 31430 med hans (false)
aftale3100564534paatorsdag (false)
312039283 (true)

I would like these two strings also to be true.

ifølge aftale 3100010000 med per (true)
aftale3100564534paatorsdag (true)

What am I missing in the regex expression?

Best regards
Morten

Hi @morsoe

Can you post the regex expression? :slight_smile:

In any case, you should be able to do it with \\d{9,11}

image

2 Likes

Here is the regex expression and result.

image

Hi @morsoe

I see, you need to match the entire string in a RegexMatcher:

regexMatcher($column1$,".*\\d{9,11}.*")

1 Like

Thank you. Now I’m getting the correct result.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.