Remove encoding modifiers from regexes.