Gossamer Forum
Home : Products : Gossamer Links : Discussions :

REGEX to prevent spaces

Quote Reply
REGEX to prevent spaces
I want to force my new users to only use underscores instead of spaces in their username.

What is the regex to prevent spaces between words as well as leading or training spaces?

I thought about using javascript, but this is not the real answer I think.

I would like to see better error reporting capability from Links when a user incorrectly enters data into any of the links forms. Like "The username field must not contain any spaces". Or whatever based on the regex. I know this can easily be done with javascript, but doesnt this limit users or cause potential problems for some browsers?

Thanks guys.


http://www.iuni.com/...tware/web/index.html
Links Plugins
Subject Author Views Date
Thread; hot thread REGEX to prevent spaces Ian 4461 Jun 3, 2002, 10:10 AM
Thread; hot thread Re: [Ian] REGEX to prevent spaces
Andy 4407 Jun 3, 2002, 10:29 AM
Post; hot thread Re: [Andy] REGEX to prevent spaces
VanSchongluer 4358 Jun 3, 2002, 10:34 AM
Thread; hot thread Re: [Ian] REGEX to prevent spaces
VanSchongluer 4384 Jun 3, 2002, 10:32 AM
Thread; hot thread Re: [searchposts] REGEX to prevent spaces
Ian 4384 Jun 3, 2002, 10:38 AM
Thread; hot thread Re: [Ian] REGEX to prevent spaces
Paul 4399 Jun 3, 2002, 10:56 AM
Thread; hot thread Re: [Paul] REGEX to prevent spaces
Ian 4389 Jun 3, 2002, 11:05 AM
Thread; hot thread Re: [Ian] REGEX to prevent spaces
Paul 4365 Jun 3, 2002, 11:06 AM
Post; hot thread Re: [Paul] REGEX to prevent spaces
Ian 4383 Jun 3, 2002, 11:08 AM
Thread; hot thread Re: [Paul] REGEX to prevent spaces
Ian 4351 Jun 3, 2002, 11:19 AM
Thread; hot thread Re: [Ian] REGEX to prevent spaces
Andy 4365 Jun 3, 2002, 11:22 AM
Thread; hot thread Re: [Andy] REGEX to prevent spaces
Ian 4368 Jun 3, 2002, 11:26 AM
Post; hot thread Re: [Ian] REGEX to prevent spaces
Andy 4338 Jun 3, 2002, 11:30 AM