Apply pattern with case insensitive