Skip to content

Workaround for backreference #512

Open
@Kibukx

Description

@Kibukx

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions