//尺寸/质量信息输入验证
export const productRexg = (value: any) => {
    if (!value) {
        return;
    }
    let result = value
        .toString()
        .replace(/^0/)
        .replace(/[^\d.]/g, "")
        .replace(/\.{2,}/g, ".")
        .replace(/^\./g, "")
        .replace(".", "$#$")
        .replace(/\./g, "")
        .replace("$#$", ".")
        .replace(/^(-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3");
    return result;
};
