DataGrip
 
Get DataGrip

Code Inspection: Duplicate character in character class

Last modified: 13 May 2022

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: