I need to filter rows with repeated numbers in some id field in a table. For that i use a regular expression
\b(\d)\1+\b
This is an example of the regex.
https://regex101.com/r/rJ7hJ6/7
But in impala this solution doesn't work. I tried
select regexp_like('1111111111', '([0-9])\1+');
i this case return True
select regexp_like('2222', '([0-9])\1+');
In this case return False
I think is because impala don't recognize \1
operator so i added another backslash to the query to escape the operator
select regexp_like('1111111111', '([0-9])\\1+');
But when execute that i get a syntax error
Invalid regex expression: '([0-9])\1+'
Someone know whats is happened?? and how can fix that?
Thanks!