Back to Intellij Community

RegExpDuplicateCharacterInClass

RegExpSupport/resources/inspectionDescriptions/RegExpDuplicateCharacterInClass.html

2025.3-rc-2240 B
Original Source

Reports duplicate characters inside a RegExp character class. Duplicate characters are unnecessary and can be removed without changing the semantics of the regex.

Example:

[aabc]

After the quick-fix is applied:

[abc]