| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|Regular expression to allow space, disallow tab, ff, lf|
\s is too inclusive
What is the regular expression that matches a space, but does not match "other whitespace characters" (tab, form feed, and line feed)
I want a regular expression to match a-z, A-Z, 0-9, and space. For this particular situation, I do not want users to be allowed to input a tab character, or line feed, or form feed.
I know the following regular expression will do everything except the space requirement:
var alphaRE = /^[a-zA-Z0-9]+$/;
How do I change that regular expression to include just space characters?
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved