Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET Databases Also see the forum ASP Databases for more general discussions of ASP database issues not directly related to these books.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old November 5th, 2008, 02:32 PM
Posts: n/a
Default expression Validator

I am using a regular exp validator to accept alphabets:

But , I also want accept these special characters along with
the alphabets: ( ,), {,} ,[,].
How should I modify the above expression????

Reply With Quote
  #2 (permalink)  
Old November 5th, 2008, 03:36 PM
Friend of Wrox
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,652
Thanks: 3
Thanked 141 Times in 140 Posts

Just put a backslash in front of any special character.

But I hope you realize that this expression will make the following inputs *LEGAL AND ACCEPTED*:


And many more.

If you mean that you want *ONLY* the characters you have listed, then you *MUST* add the beginning-of-text and end-of-text markers, thus:
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expression Validator on Multi-Line TextBox wagswvu General .NET 1 June 4th, 2008 09:24 AM
Regular Expression Validator displaying a label thomaswharmanjr26 C# 0 January 25th, 2008 02:38 PM
Validator expression Maxxim ASP.NET 1.0 and 1.1 Professional 1 December 3rd, 2006 06:07 AM
Regular expression validator PT C# 4 August 25th, 2005 07:50 AM
question regarding regular expression validator NewbieProg Classic ASP Basics 1 November 9th, 2004 07:49 AM

All times are GMT -4. The time now is 12:24 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.