subpattern name
페이지 정보
작성자 네모난도파 작성일 10-10-29 23:01 조회 283 댓글 0본문
$str = "2010-10-29";
preg_match("/(?P<year>\d+)-(?P<month>\d+)-(?P<day>\d+)/", $str, $matches);
//preg_match("/(?<year>\d+)-(?<month>\d+)-(?<day>\d+)/", $str, $matches);
echo $matches['year'];
echo $matches['month'];
echo $matches['day'];
일치하는곳의 이름을 지정할 수 있다<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 18:00:23 Regular Expression (정규표현식)에서 이동 됨]</div>
preg_match("/(?P<year>\d+)-(?P<month>\d+)-(?P<day>\d+)/", $str, $matches);
//preg_match("/(?<year>\d+)-(?<month>\d+)-(?<day>\d+)/", $str, $matches);
echo $matches['year'];
echo $matches['month'];
echo $matches['day'];
일치하는곳의 이름을 지정할 수 있다<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 18:00:23 Regular Expression (정규표현식)에서 이동 됨]</div>
댓글목록 0
등록된 댓글이 없습니다.