fix regex in constructor matching