When you check the above things on the net, you will often see the following description.
preg_replace ("/ [\ xF0- \ xF7] [\ x80- \ xBF] [\ x80- \ xBF] [\ x80- \ xBF] /", "", $str);
This can delete 4Byte emoji, but it seems not enough.
For example, the following 3 byte pictograms cannot be deleted.
<? php $str = "☔️"; echo $str;// "☔️" $str = preg_replace ("/ [\ xF0- \ xF7] [\ x80- \ xBF] [\ x80- \ xBF] [\ x80- \ xBF] /", "", $str); echo $str;// "☔️" ?>
In addition, gender symbols will remain in pictograms that have gender expressions, such as those running on 4-byte pictograms.
Answer # 1
First, remove basic emoji.
$str = "
- please explain the source code of cakephp
- php - please tell me about the transfer cost of the framework
- php - please let me know if the order of rollback is unsatisfactory thank you
- please tell me the meaning of "?" and ":" that connect wordpress or php functions
- php - please tell me about the transfer mode and line feed code in ftp
- php - wp contact form 7 failed to send the message please try again later is displayed and the message cannot be sent
- php - please tell me about the development environment for web applications
- php - please tell me how to rewrite $stmt->rowcount();of pdo with oci
- php - please tell me how to modify/add multiple data with laravel upsert
- i don't know how to remove some lines using php: fopen ()
- php - i want to remove line breaks and paragraphs in the advanced custom fields editor and enable shoot code
- php - when i update wordpress, i get an error please tell me the cause of the syntax error
- i want to remove the part of the php string before /
- python 3x - i want to remove tags by scraping with python and get only emoji
- i want to remove error checking for specific fields on the cakephp controller side
- php - it doesn't work to remove whitespace and line feed code after converting an array to a string
- php - i want to remove some duplicates of the array acquired by sql
- php - please tell me about freeing mysql memory
- php - please tell me how to use explode
- php - please tell me a reference book that contains sample code that implements refined search and pager