Who would have thought that Python Regex is its own thing, with particular exceptions, patterns and groups.

It's like learning a whole new language. All to match a single group of digits. Thanks, Van Rossum.

#python #code #programming #regex #coding

@ponchoima Well, every regex engine has its own quirks, but for the most part Python's works like PCRE.

#Python #programming

@diazona Maybe I was just very used to the 'normal' patterns of PCRE2. But, all things considered, yes. Most of it was almost identical.

At the end was like using 'shall, thy and thee' in the midst of contemporary english.

@ponchoima @diazona

Can you share example input and pattern? Matching a group of digits doesn't sound like something that Python's re module would be a corner case for.

One alternative I've used is the 3rd-party library `regex`, which is also PCRE but does a couple of (complex) things more completely than the stdlib re does. API is compatible with the stdlib implementation.

@cazabon @ponchoima (I am mildly curious about this as well)