Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 28th, 2008, 04:05 AM
Authorized User
Join Date: Mar 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Regular Expression repeat problem


I am using the asp:RegularExpressionValidator to create regular expressions. I am building a form in which a student enters the name of an author (or authors) that will then generate a bibliography for them. I have no issues with the following fields

Hogg,G = [a-zA-Z]*[,][a-zA-Z]*

Hogg,G & Hogg,C = [a-zA-Z]*[,][a-zA-Z]*\s[&]\s[a-zA-Z]*[,][a-zA-Z]*

However this is where I run into problems. I have no guarantee how many authors there will be. For example, Hogg,A, Hogg,B, Hogg,C, Hogg,D & Hogg,E

or it could be

Hogg,A, Hogg,B, Hogg,C & Hogg,D

I know that the * and + is what is used for repeat expressions. I have tried various expressions but nothing will work. I am working with this expression - notice the brackets for grouping.


Hogg,A, Hogg,B, Hogg,C, & Hogg,D won't work with it


Hogg,A, Hogg,B, & Hogg,D will work

I don't get it, what am I doing wrong?

Old May 28th, 2008, 06:45 AM
Authorized User
Join Date: Dec 2006
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts

Your problem is regarding regular expression. You can post your problem in the following site -

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular expression problem keyvanjan ASP.NET 2.0 Basics 0 May 28th, 2007 12:19 PM
regular expression problem muki XSLT 2 January 11th, 2006 06:04 AM
Regular Expression (Big Problem) vinod_yadav1919 Javascript How-To 6 November 3rd, 2004 05:24 AM
Regular expression problem ghalebro PHP How-To 1 August 24th, 2004 08:10 AM
Regular Expression problem Mitch PHP How-To 2 May 14th, 2004 07:43 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.