- extract prefix (if provided one is null)