C language compatible regular expression (with instance)