(?i) within the pattern begins case-insensitive matching, (?-i) ends it. That is,
(?i)foo(?-i)bar
matches FOObar but not fooBAR.
EDIT: I should have said (?-i) starts case-sensitive matching - if you want the whole pattern to be case-insensitive then you don't need to "end" the (?i).