subpattern name
페이지 정보

본문
$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>
- 이전글1000번째 회원께는 특별 포인트를 부여하겠습니다. 03.06.07
- 다음글옆집 여자가... 10.02.26
댓글목록
등록된 댓글이 없습니다.