Re: Anyone good at regular expressions???

From: Date: Wed, 23 Aug 2000 20:50:42 +0000
Subject: Re: Anyone good at regular expressions???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-13217@lists.php.net to get a copy of this message
"ssonne" <ssonne@home.com> writes: > I've been stumped for a few days at how to write one expression to do the > following...any help is appreciated. > I have a name and password form and I want to check that.... > only letters a-z and A-Z and numbers 0-9 are allowed, > and i'd like to allow the space character, but NOT at the beginning or end > of the string > > I've managed to get it to work, but not in one expression...had to use a > few, lol Off the top of my head: ^[a-zA-Z0-9]+[a-zA-Z0-9 ]*[a-zA-Z0-9]$ -- Bud Rogers <budr@sirinet.net> http://www.sirinet.net/~budr/zamm.html

« previous php.general (#13217) next »