char hh[512]={0};
strcpy(hh,"PrinterSerialNumber:G11404;PrinterStatus");
string str;
str=hh;
str=str.replace(str.find("PrinterSerialNumber:"),strlen("PrinterSerialNumber:"),"");
str=str.replace(str.find("PrinterSerialNumber:"),strlen(";PrinterStatus"),"");
输出结果为:G11404