Inspectopedia Help

Duplicate character in character class

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]
[abc]
Last modified: 12 March 2024