2014-04-19 2 views

답변

1

당신은 preg_match() 말했다 대신 사용한다

$str = "string: hi, it is string."; 

내가 좋아하는 것이를 얻을 수 preg_match_all()이므로 여기 정규 표현식에서 u 수정자를 사용할 필요가 없습니다.

$str = "string: hi, it is string."; 

preg_match_all('/[a-z]+/i', $str, $matches); 
print_r($matches[0]); 

출력이 작동

Array 
(
    [0] => string 
    [1] => hi 
    [2] => it 
    [3] => is 
    [4] => string 
) 
+0

. 감사... – igorb0214

관련 문제