답변 2개
채택된 답변
+20 포인트
8년 전
http://php.net/manual/en/regexp.reference.escape.php">http://php.net/manual/en/regexp.reference.escape.php
\s
any whitespace character
</p><p><?php</p><p>$match01 = [];</p><p>$text01 = '<span> 홍길동</p><p> </span> <span> 홍 길 동</p><p> x </span><span>홍길동</span>';</p><p>
</p><p>preg_match_all('`<span>\s*([^\s].+)\s*</span>`isU', $text01, $match01);</p><p>
</p><p>print('<pre>');</p><p>print_r($match01);</p><p>print('</pre>');</p><p>?></p><p>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인