Fix another regex matching bug for package build time