I strongly suspect you want \. (match a period), not . (match any character). /.,;/ will match (and remove!) any character followed by , followed by ; -- this doesn't sound anything like what you want. Can you provide sample input and desired output?