Open OnlineCop opened 3 years ago
Wouldn't their need be filled by simply using the PCRE flavor?
Mostly, yes, but if PCRE
were selected as the flavor, the Code Generator is using the re
module instead of the regex
module when you change to the Python language.
Most of those advanced features are supported under the regex
module, so we might want to change re
for regex
when the Flavor is PCRE and the Code Generator language is set to Python.
Possible alternative is to have multiple code generators for Python? (2 vs 3, re vs regex)
Wouldn't their need be filled by simply using the PCRE flavor?
No, actually. In contrast to PCRE, the regex
module supports variable-width lookbehinds, for instance (like ECMAScript, but the named group structure in ECMA is (?<name>pattern)
instead of (?P<name>pattern)
)
This may be a duplicate of #1219.
I see multiple issues being opened regarding Python syntax: #1271, #1403, #1404.
Should we offer users who choose Python as the flavor, a choice to select either the
re
or theregex
modules?regex
is backward-compatible withre
but extends many of the PCRE features, like inline flags,\K
, recursion, etc.