Hi! You can use: if (preg_match('/[a-z0-9]/i', $variable)) { //OK } else { //problem } []'s ====================================== Jony dos Santos Kostetzer Pesquisa & Desenvolvimento / Research & Development A2C Internet para Negócios / A2C Internet to Business www.a2c.com.br ====================================== Em Qua 08 Fev 2006 09:47, Francisco - São Paulo - Brazil escreveu: > Sorry for asking for something so basic, but I am really bad in regexp. > > I would like to validate a text typed , it must have: > A-Z > a-z > 0-9 > _- > > Example: Frank_23z > > Thanks in advance > > > PHP Data object relational mapping generator > http://www.metastorage.net/ > > > > > SPONSORED LINKS > > Programming languages > Object oriented programming > Php developer > > > Computer security > C programming language > Computer programming languages > > > > YAHOO! GROUPS LINKS > > > Visit your group "php-objects" on the web. > > To unsubscribe from this group, send an email to: > php-objects-unsubscribe@xxxxxxxxxxxxxxx > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. -- ====================================== Jony dos Santos Kostetzer - jony@xxxxxxxxxx Pesquisa & Desenvolvimento A2C Internet para Negócios - www.a2c.com.br ====================================== "A arte do conhecimento está na consciência humana. Só é digno de seu poder aquele que o justifica dia após dia." PHP Data object relational mapping generator http://www.metastorage.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/