You are here: Validating data « PHP Programming Language « IT news, forums, messages
Validating data

Posted by Anthony Smith on 04/27/07 22:22

I have data that is in this format: 8-8-19-29-1-4-41
I wanted to write a simple function or regular expression that
verified that data is in that format. The numbers should only be 1 or
2 digits. There should be 6 dashes (-) with 7 numbers around the
dashes. Here are examples of bad data:


8-19-29-1-4-41 (Only 6 dashes)
5-1-2-3-4-S-67-4 (Includes a letter)
5-1-2-3-4-222-67-4 (has three digits in one space)

 

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

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