Lock down regexes more tightly
Prepare 0.40.0 release