Please Include in Python new Perl/Notepad++ operators and expressions

I want to use this kind of regex formula în Python, and I cannot do that . Python is very, very limited.

(?:<p class="mb-40px">|\G).*?\K(?:<a href=.+?</a>(*SKIP)(*FAIL)|<(?:(?!/?p).)+?>)

I use all the time regex formula în Perl ore Notepad++, but Python don’t know the operators such as \K , \R, \G or (*SKIP)(*FAIL) (*PRUNE)…and much more.

these are very important in solving problems and are absolutely necessary because they simplify things a lot. See 2 links Below . it would be very nice if Python manage to be able to use these very important operators.

They seem to be supported by this Python library: pip install regex / import regex

Maybe also an option: pip install pcre2 / import pcre2

1 Like

All but \R are supported in the regex module. What with Python’s “universal line endings”, the different kinds of line endings are usually converted to \n, so there’s not much need for it.