regular expressions written in c