Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for backreference #512

Open
Kibukx opened this issue Sep 19, 2024 · 0 comments
Open

Workaround for backreference #512

Kibukx opened this issue Sep 19, 2024 · 0 comments

Comments

@Kibukx
Copy link

Kibukx commented Sep 19, 2024

I'm currently trying to get strings that contain 3 or more consecutive characters with the following regex:

SELECT *
FROM test.test
WHERE REGEXP_CONTAINS(first_name, r'(.)\1{2,}')

for example: "mikeeee", "dylaaan", etc but bigquery complains

Cannot parse regular expression: invalid escape sequence: \1

how can I get around this limitation since I'm aware that backreference isn't supported. Any help would be much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant