View Single Post
  #2 (permalink)  
Old 06-26-09, 03:34 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
PHP Code:

'~^\d{4}[ ]?[a-z]{2}$~i' 

And get used to preg_match() rather than the ereg* functions. They're way slower and they're gonna be disabled by default (or removed completely, not sure) in PHP 6.
Reply With Quote