added basic support for regex