note 73396 added to function.preg-match

From: Date: Wed, 21 Feb 2007 15:59:51 +0000
Subject: note 73396 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-123643@lists.php.net to get a copy of this message
axima's function that attempts to match preg_match a date has an error in his pattern. if the day is the 20th or 10th then it fails. so, you want to use: /^([1-9]|0[1-9]|[12][0-9]|3[01])\D ([1-9]|0[1-9]|1[012])\D (19[0-9][0-9]|20[0-9][0-9])$/ ---- Server IP: 64.71.164.2 Probable Submitter: 71.39.103.217 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match.php Edit -- https://master.php.net/note/edit/73396 Del: integrated -- https://master.php.net/note/delete/73396/integrated Del: useless -- https://master.php.net/note/delete/73396/useless Del: bad code -- https://master.php.net/note/delete/73396/bad+code Del: spam -- https://master.php.net/note/delete/73396/spam Del: non-english -- https://master.php.net/note/delete/73396/non-english Del: in docs -- https://master.php.net/note/delete/73396/in+docs Del: other reasons-- https://master.php.net/note/delete/73396 Reject -- https://master.php.net/note/reject/73396 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#123643) next »