Extract regex based parser stuff in separate class