I spent one hour to solve this puzzle with grep but failed. I thought it was totally NOT easy level! Or that means I'm in low level?
I failed in these cases:(
I suggest move this question into at least "Medium"