Inspectopedia
 
2024.3

Single character alternation

Warning
New
Last modified: 03 December 2024

Reports single char alternation in a RegExp. It is simpler to use a character class instead. This may also provide better matching performance.

Example:

After the quick-fix is applied:

New in 2017.1