lex2-py3 (v1.1.1)

lex2 is a library intended for lexical analysis (also called tokenization). String analysis is performed using regular expressions (regex) in user-defined rules. Some additional functions, such as dynamic ruleset stack, provide flexibility to some degree at runtime.

The library is written in platform independent pure Python3, and is portable (no usage of language-specific features) making it straightforward to port to other programming languages. Furthermore, the library is designed to enable the end-user to easily integrate any external regex engine of their choice through a simple to use unified interface.