Variable-Width Lookbehind Issue in Python
regex module: variable-width lookbehind In addition to the answer by HamZa, for any regex of any complexity in Python, I recommend using the outstanding regex module by Matthew Barnett. It supports infinite lookbehind—one of the few engines to do so, along with .NET and JGSoft. This allows you to do for instance: import regex if … Read more