Remove useless g flag from Regex