PHP preg_split()

Jmnote (토론 | 기여)님의 2023년 9월 29일 (금) 14:41 판 (→‎같이 보기)

1 개요

PHP preg_split()
$keywords = preg_split("/[\s,]+/", "hypertext language, programming");
print_r($keywords);
$str = 'string';
$chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);
print_r($chars);
$str = 'hypertext language programming';
$chars = preg_split('/ /', $str, -1, PREG_SPLIT_OFFSET_CAPTURE);
print_r($chars);

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}