Fix the regex in old script