Unlikely scenario, but how does this behave if the grouping is in the middle of the string, like:

`"^.*--(.*)--.*$"