You are here: Regex help please « All PHP « IT news, forums, messages
Regex help please

Posted by Neeper on 10/13/93 11:32

I am trying to validate a postal code and a reference field, currently
I am using this these 2 functions:


// Validates the string if it consists of alphanumeric chars
function isAlphaNumeric($checkThisString)
{
// Originally, [^A-Za-z0-9[:space:]] but added support for
punctuation characters
if(ereg('[^A-Za-z0-9\.\,\'\#[:space:]]', $checkThisString))
return false;
else
return true;
}



I need to allow dashes( - ) in the postal code and not sure how to do
this.

Any help would be great.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация