My database is utf8 and does not support inserting data beyond BMP character encoding such as emoticons. But I don't want to set the database to utf8mb4. How to perform validation on the backend that does not support data beyond BMP character encoding, such as regular expressions or other methods.
I know the range of BMP character is U+0000和U+FFFF, butI don't know if there is a regular expression to verify whether the given value is within or outside this encoding range