custom regular expressions – spare time approach to implement a feature-complete regex processor in python3