Implementation of a system that allows regex matches