如何匹é…文本周围的所有符å·

时间:2013-10-01 11:14:32

标签: php

$text = '2434__(this is something)-__2345';

 preg_match('/[\p{Latin}]+/u', text, $matches);

这里我åªå¾—到一个匹é…的文本,但是如何匹é…文本中存在或ä¸å­˜åœ¨çš„所有符å·ï¼Ÿ

2 个答案:

答案 0 :(得分:0)

这将匹é…所有符å·ï¼š

$match = $text

答案 1 :(得分:0)

我希望能ç†è§£ä½ æƒ³è¦çš„东西..

preg_match('/^([^\p{Latin}]+)([\p{Latin}\s]*)([^\p{Latin}]+)$/u', $text, $matches);

print_r($matches);