Use grep -E in f() to make sure match ERE pattern