While testing this regex today on regex101.com,
^([a-z0-9]+(-)*)*([a-z0-9])$
I got "catastrophic backtracking" error when I tested it on this string:
with flavor PHP:
aaaaaaaaaaa-aaaaT
with flavor Python:
aaaaaaaaaaa-aaaaT
with flavor ECMAScript this longer string got a timeout that 'may be an indication of catastrophic backtracking'
aaaaaaaaaaa-aaaaaaaaaaaaaaaaaT
with flavor Java 8 timeout with string
aaaaaaaaaaa-aaaaaaaaaaaaaT
but flavor Go gave no error or timeout event with much longer such strings. Instead it shows no match (0.0ms)
So can I ignore that error/warning when my regex is being used in Go?
I am interested in the reason for this too, but above is my key question.