RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})
Description
Checks for Date in the typical MySQL DB Format. Not mutch but simple to for converting to German date format: $date = "2003-12-03"; if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) { echo "$regs[3].$regs[2].$regs[1]"; // prints 03.12.2003 }
Matches
2002-11-03 | 2007-17-08 | 9999-99-99
Non-Matches
2002/17/18 | 2002.18.45 | 18.45.2002
Author Rating: Not yet rated. Mike T Spike
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials