grep clone in a modern language