fixed building regex bug