Back (Current repo: scraps)

random scraps and notes that are useful to me
To clone this repository:
git clone https://git.viktor1993.net/scraps.git
Log | Download | Files | Refs

commit 9f1fcc729e35fd5b2f8d9b6427e5605e97d9857c
parent f18fea30044b46a8f7e6ff21c159c9829c4d5bd6
Author: root <root>
Date:   Mon, 21 Apr 2025 16:32:10 +0200

add php script

Diffstat:
Aphp/snippets/remove_emoji.php | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/php/snippets/remove_emoji.php b/php/snippets/remove_emoji.php @@ -0,0 +1,5 @@ +<?php + +function removeEmoji($string, $replacement = '') { + return preg_replace('/(?:\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})/s', $replacement, $string); +}