Inspectopedia Help

RegExp

Anonymous capturing group or numeric back reference   New in this release

Reports anonymous capturing groups and numeric back references in a RegExp.

Begin or end anchor in unexpected position   New in this release

Reports ^ or \A anchors not at the beginning of the pattern and $, \Z or \z anchors not at the end of the pattern.

Consecutive spaces   New in this release

Reports multiple consecutive spaces in a RegExp.

Custom RegExp inspection   New in this release

Custom Regex Inspection.

Duplicate branch in alternation   New in this release

Reports duplicate branches in a RegExp alternation.

Duplicate character in character class   New in this release

Reports duplicate characters inside a RegExp character class.

Empty branch in alternation   New in this release

Reports empty branches in a RegExp alternation.

Escaped meta character   New in this release

Reports escaped meta characters.

Octal escape   New in this release

Reports octal escapes, which are easily confused with back references.

Redundant '\d', '[:digit:]', or '\D' class elements   New in this release

Reports redundant \d or [:digit:] that are used in one class with \w or [:word:] (\D with \W) and can be removed.

Redundant character escape   New in this release

Reports redundant character escape sequences that can be replaced with unescaped characters preserving the meaning.

Redundant nested character class   New in this release

Reports unnecessary nested character classes.

Regular expression can be simplified   New in this release

Reports regular expressions that can be simplified.

Single character alternation   New in this release

Reports single char alternation in a RegExp.

Suspicious back reference   New in this release

Reports back references that will not be resolvable at runtime.

Unnecessary non-capturing group   New in this release

Reports unnecessary non-capturing groups, which have no influence on the match result.

Last modified: 11 September 2024