Some characters that appear as a single visual unit are actually composed of multiple Unicode code points.
When these appear in regex character classes, each code point is matched separately, which is typically not the intended behavior.
This rule detects several types of multi-code-point characters in character classes:
Surrogate pairs: Characters like π that require two UTF-16 code units
Combined characters: Base characters with combining marks like Γ (A + combining accent)
Emoji with modifiers: Emoji with skin tone modifiers like πΆπ»
Regional indicator symbols: Flag emoji like π―π΅ (two regional indicators)
If you intentionally want to match individual code points rather than visual characters, or if your regex pattern specifically needs to match partial Unicode sequences, you might prefer to disable this rule.
Some specialized text processing may require matching individual surrogate halves or combining marks.