x.xx 保留两位小数
/^[1-9]\d*\.?\d{0,2}$|^0\.[1-9]{1}\d?$|^0\.\d[1-9]$/;
替换字符串中 以{开始 }结束的字符串 .*代表任意字符preg_replace('/\{.*\}/','',$str);