Posted by David on 12/01/06 08:04
I forgot to mention as well that it was allowing whitespace. Which i did not
want.
all i want is A-Z regardless of case. and Numbers. No other characters. And
start with a letter.
"David" <nospam@nospanm.com> wrote in message
news:q9Qbh.659$HU.278@news-server.bigpond.net.au...
> Help how can I force the variable to start with a character.
>
> I dont want it to start with a number????
>
>
>
> function alphanumeric($alphanumeric_field)
> {
> if(!preg_match("/[^a-zA-Z0-9]+$/",$alphanumeric_field))
> return TRUE;
> else
> return FALSE;
> }
>
>
>
> any ideas much appreciated. As i am so frustrated with the preg_match
> function!!
>
Navigation:
[Reply to this message]
|