Js how Filter utf8 non-3-byte encoded string

how to js Filter utf8 non-3-byte encoded string

Mar.16,2021

conversion relationship table between Unicode and UTF-8 (the x character represents the bit occupied by the code point)

                Byte 1    Byte 2    Byte 3    Byte 4    Byte 5    Byte 6
  7    U+0000    U+007F    1    0xxxxxxx
11    U+0080    U+07FF    2    110xxxxx    10xxxxxx
16    U+0800    U+FFFF    3    1110xxxx    10xxxxxx    10xxxxxx
21    U+10000    U+1FFFFF    4    11110xxx    10xxxxxx    10xxxxxx    10xxxxxx
26    U+200000    U+3FFFFFF    5    111110xx    10xxxxxx    10xxxxxx    10xxxxxx    10xxxxxx
31    U+4000000    U+7FFFFFFF    6    1111110x    10xxxxxx    10xxxxxx    10xxxxxx    10xxxxxx    10xxxxxx

is either 3 bytes or

other than 0x0800-0xffff.
const str = '1\a';
const reg = /[^\u0800-\uffff]/g;
str.replace(reg,'');
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-1e417b4-4492d.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-1e417b4-4492d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?