Inspectopedia
 
2024.3

Duplicate character in character class

Warning
New
Last modified: 03 December 2024

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

Example:

After the quick-fix is applied: