Inspectopedia Help

Redundant nested character class

Reports unnecessary nested character classes.

Example:

[a-c[x-z]]

After the quick-fix is applied:

[a-cx-z]

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

RegExpRedundantNestedCharacterClass
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | RegExp

New in 2020.2

Last modified: 27 August 2024