Using Modifiers of Perl-compatible Regex (PCRE) in grep

For the modifiers imsxadlup you can use the (?X) for as described in Extended Patterns:

$ echo FOO | grep -P '(?i)foo'
FOO