Files
openide/python/testData/regexp/conditional.py
Bas Leijdekkers eccf815b89 RegExp: conditionals support for Ruby and improved conditionals support for PHP (RUBY-27316, WI-51955)
GitOrigin-RevId: 4790db7eeaf658d724ba7c70ed138c9472bf8f2c
2020-11-06 13:44:04 +00:00

7 lines
731 B
Python

import re
re.compile(r"(?P<group1>delicious )?(?(group1)hamburger|milkshake)");
re.compile(r"(?P<group1>delicious )?(?(1)hamburger|milkshake)");
re.compile(r"(?P<group1>delicious )?(?<error descr="This kind of group reference condition is not supported in this regex dialect">('group1')</error>hamburger|milkshake)");
re.compile(r"<error descr="This named group syntax is not supported in this regex dialect">(?<group1>delicious )</error>?(?<error descr="This kind of group reference condition is not supported in this regex dialect">(<group1>)</error>hamburger|milkshake)");
re.compile(r"<error descr="This named group syntax is not supported in this regex dialect">(?'group1'delicious )</error>?(?(group1)hamburger|milkshake)");