Files
openide/python/testData/regexp/lookbehind.py
Bas Leijdekkers ce078dac32 RegExp: new "Regular expression can be simplified" inspection (IDEA-286122)
Supersedes the "Asterisk closure can be collapsed to plus closure" inspection which was only available in PhpStorm

GitOrigin-RevId: a63c6fce88b3700cc521e8b113069a4b2b50a3e4
2022-01-13 20:26:25 +00:00

12 lines
499 B
Python

import re
re.compile(r"(?<!a|b)");
re.compile(r"(?<!<error descr="Alternation alternatives need to have the same length inside lookbehind">a|bc</error>)");
re.compile(r"(?<!a{3}})");
re.compile(r"(?<!a{3,3}})");
re.compile(r"(?<!a<error descr="Unequal min and max in counted quantifier not allowed inside lookbehind">{3,4}</error>})");
re.compile(r"(?<!a|b{1})")
re.compile(r"(?<!abcd|(ab){2})")
re.compile(r"(?<!abcde|x(ab){2})")
re.compile(r"(?<!a(ab|cd)|xyz)")
re.compile(r'(?<!aa|b[cd]|ee)str')