Refactor regular expession