Regex does case-insensitive matching and updated dictionary accordingly