a functional regular expression library