함수 extract urls()

Jmnote (토론 | 기여)님의 2016년 4월 23일 (토) 00:48 판 (새 문서: 분류: URL ==PHP== 분류: PHP <source lang='php'> function extract_urls($text) { preg_match_all("/(\b(?:(?:https?|ftp):))?\/\/[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)


PHP

function extract_urls($text) {
	preg_match_all("/(\b(?:(?:https?|ftp):))?\/\/[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i", $text, $matches);
	return $matches[0];
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}