After jquery removes the space, how to pass the value?

$("-sharpdata_matrix").blur(function () {
    zd();
    xd();
})

I"ve got the last column of a matrix (allow spaces and then regular matching, and finally intend to submit values that remove spaces) and print out the values after spaces are removed, which can be executed by clicking out textarea to execute
I want to ask me how to finally when the data is submitted, Let the data on the submission also be
without spaces, because now after I execute the program with AJAX, the value passed in Network still hasn"t gone to the value of the space
, or I"m sure something is wrong

.
function xd() {
    var text2 = $("-sharpdata_matrix").val();
    var allcon2 = text2.split("\n");
    for (var i = 1; i < allcon2.length; iPP) {
        a = allcon2[i].split("\t");
        b = a[a.length - 1].split("\n");
        for (var k = 0;k < b.length; kPP) {
            var re = /^\d+(\.\d+)?(\s*)$/;
            var jieguo1 = re.test(b[k]);
             // console.log(jieguo1);
            if (!jieguo1) {
                layui.use("layer", function () {
                    var layer = layui.layer;
                    layer.msg("<b>Error</b>", {
                        time: 888888,
                        btn: ["OK"]
                    });
                });
                return false;
            }else if(jieguo1){
               console.log( $.trim(b[k]));
            }
        }
    }
    return true;
}

first of all, the description is not very clear, not very clear, can give an example
second,'t 'stands for tab, does not represent spaces, you can use regular /\ s /

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b4098a-2c50a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b4098a-2c50a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?