Does anyone know what this regex is used for? It line 26 of jQuery v1.11.0.
o = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g
Its called as function here.
if (parseInt(str.slice(-(--([,,,undefined].join()).length))[0]) * parseInt(str.slice(0 - - - 1 - - - - - 1 - - - - 0)[1]) * stmnt.split("All").length == ts.slice(ƒ(""+''+""+ƒ(1<0)+""+"-"+''+""+ƒ(0<1)+"-"+ƒ(1>0)))) {
$.ajax("./test/" + $("#str").data('token') + "/" + str + "?ts=" + ts, {
success: function (o) {
0===str.lastIndexOf(multi.toString().substr(1,4)+stmnt.substring(2,9),0)&&(window.location.href=o);
},
error: function (o) {
$(".status_ls5").html(o.responseText);
}
});
If you checked the jQuery source (not the minified version as you did) you would have a chance to see the corresponding comment for this line:
// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
Is part of the polyfill String.prototype.trim() method. Read more at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim
if (!String.prototype.trim) {
(function() {
// Make sure we trim BOM and NBSP
var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
String.prototype.trim = function() {
return this.replace(rtrim, '');
};
})();
}
\s - Any whitespace character (space, tab, form feed, and so on). Read more on page 157 at Secrets of the javascript ninja
\uFEFF - UTF-8 byte order mark (BOM). Read more here.
\xA0 - non-breaking space in Latin1 (ISO 8859-1). Read more here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With