1: <?php
2:
3: if (!function_exists('strip_punctuation')) {
4: function strip_punctuation($string)
5: {
6: return trim(preg_replace([
7: '/[^[^\p{L}\d]+/u',
8: '/[\s]+/',
9: ], [
10: ' ',
11: ' ',
12: ], $string));
13: }
14: }
15: