Copy Code code as follows:
var triminfo =
{basic://
Simple white-space character filtering in VB
, Classic:/\s/
Traditional JS White-space character filtering
, Ecmascript5:/[\s\xa0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]/
Supplementary definition for/s in ECMAScript 5
, ex:/[\s\xa0\u2028\u2029]/
The impression is related to the identifier or string in JS, forget where it came from XD
, Control:/[\x00-\x1f\x7f-\x9f]/
A simple filter that adds control characters
, dotnet:/[\s\xa0\u2000-\u200b\u3000\ufeff]/
// . NET platform's default implementation
, Unicode:/[\s\x85\xa0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]/
Filtering whitespace characters defined in the Unicode standard
, Complex:/[\x00-\x20\x7f-\xa0\u1680\u180e\u2000-\u200b\u2028\u2029\u202f\u205f\u3000\ufeff]/
Composite filtration, is the combination of the above several
};
Note: The code listed is used for regular expression syntax only for convenience of program processing, but is not actually a regular expression that can be used directly for filtering.
Depending on the actual usage, you may need to add flags such as "G" or further process them into more complex regular expressions.