String: cxaaz0a9mmm
Pattern ([ab])\1 returns 1 match aa
Pattern ([ab])[\1] returns no mathches (expected: as above)
Pattern ([ab])[^\1] returns 2 matches aa and a9 (expected and wanted: 1 match a9)
Please
- explain why single-character backreference does not work as expected [by myself :-( ] and
- give me recommendation how to match a single (not doubled one) captured character referred with backreference \1. (Two characters, the first being "a" or "b" and the second character defferent from the first).
Thanks