<?php $string='دد'; echo preg_replace('#(?:^[^\p\L]*)|(?:[^\p\L]*$)#u','',$string);
You have javascript disabled. You will not be able to edit any code.