Fix case insensitive matching in compiled regular expressions