- Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- Array ( [0] => :slight_smile: [1] => :joy: )
<?php
$string = 'Hello How are you :slight_smile::joy:';
$regex = "/:([a-zA-Z0-9_]*):/";
preg_match_all($regex, $string, $matches);
print_r($matches[0]);