grep by matching multiple patterns