Fix grep too slow when ignore_case

Signed-off-by: Bao Haojun <baohaojun@gmail.com>