regex-pattern-with-shorter-back-reference-does-not-work-as-expected