Fixed regex problem in build script