날짜형식 체크
$string = "2018-06-26 13:47:27";
if( preg_match("/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2})\:([0-9]{2})\:([0-9]{2})$/", $string) ){
echo"날짜 형식이 맞습니다";
} else {
echo"날짜 형식이 다릅니다. 다시 입력해주세요.";
}
댓글 2개
7년 전
정보 감사드립니다.
7년 전
정규식 잘하는 분들 부럽습니다. ^^
게시판 목록
개발자팁
개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4826 | jQuery | 8년 전 | 1672 | ||
| 4825 | JavaScript | 8년 전 | 2740 | ||
| 4824 | jQuery | 8년 전 | 1464 | ||
| 4823 | jQuery | 8년 전 | 1726 | ||
| 4822 | jQuery | 8년 전 | 1812 | ||
| 4821 | jQuery | 8년 전 | 1641 | ||
| 4820 | jQuery | 8년 전 | 1647 | ||
| 4819 | jQuery | 8년 전 | 1329 | ||
| 4818 | jQuery | 8년 전 | 1969 | ||
| 4817 | jQuery | 8년 전 | 2409 | ||
| 4816 | jQuery | 8년 전 | 1705 | ||
| 4815 | jQuery | 8년 전 | 1422 | ||
| 4814 | jQuery | 8년 전 | 1839 | ||
| 4813 | jQuery | 8년 전 | 5412 | ||
| 4812 | 기타 | 8년 전 | 3164 | ||
| 4811 | jQuery | 8년 전 | 1545 | ||
| 4810 | jQuery | 8년 전 | 1716 | ||
| 4809 | jQuery | 8년 전 | 1806 | ||
| 4808 | PHP |
|
8년 전 | 5085 | |
| 4807 | node.js |
|
8년 전 | 4120 | |
| 4806 | jQuery | 8년 전 | 2219 | ||
| 4805 | jQuery | 8년 전 | 1653 | ||
| 4804 | jQuery | 8년 전 | 1201 | ||
| 4803 | jQuery | 8년 전 | 1913 | ||
| 4802 | jQuery | 8년 전 | 1418 | ||
| 4801 | jQuery | 8년 전 | 1522 | ||
| 4800 | jQuery | 8년 전 | 1742 | ||
| 4799 | jQuery | 8년 전 | 1985 | ||
| 4798 | jQuery | 8년 전 | 1521 | ||
| 4797 | jQuery | 8년 전 | 1456 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기