Various regex module improvements.