Partially implemented format by pattern function