my regular expression engine and miscellaneous