You are here: Re: How can I know if a string is alphanumeric? « PHP Programming Language « IT news, forums, messages
Re: How can I know if a string is alphanumeric?

Posted by Jim Michaels on 02/16/06 00:20

<usenet@isotopeREEMOOVEmedia.com> wrote in message
news:98jsu1pkpuhasfudb7iksdp7h75jbc3sns@4ax.com...
> On Thu, 9 Feb 2006 14:02:04 -0800, "Jim Michaels"
> <jmichae3@nospam.yahoo.com>
> wrote:
>>"Colin McKinnon"
>><colin.thisisnotmysurname@ntlworld.deletemeunlessURaBot.com> wrote in
>>message news:74NAf.62520$Dg6.12645@newsfe3-gui.ntli.net...
>>> Fernando Rodredguez wrote:
>>>
>>>> How can I know if a string only has alfanumeric chars?
>>>>
>>>
>>> Use a regex.
>>>
>>> C.
>>
>>give him an example!
>>
>>preg_match('/^[\w\d]$/', $string);
>>
>
> Or use the built-in function.
> www.php.net/ctype_alpha

that's half of it. I think you meant www.php.net/ctype_alnum
admittedly, this looks much easier. :-)

 

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

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