I need to match on the below pattern and I am trying to write a Regex in Re2, In PCRE the below Regex works fine but this does not work in Re2 Regex type as back reference is not supported in Re2.
^([A-Za-z0-9])\1+-([A-Za-z0-9])\2+-([A-Za-z0-9])\3+-([A-Za-z0-9])\4+-([A-Za-z0-9])\5+$
Is there a way to do the same thing in Re2 regex. I need to match on below patterns strictly. i.e. It should match on the same character any number of times. sth like as below
AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA
BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB
AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEEEE
aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb
11111111-1111-1111-1111-111111111111
22222222-1111-3333-4444-666666666666
aaaaaaaa-CCCC-1111-2222-DDDDDDDDDDDD