Solved

Add Comma to this RegEx

Posted on 2006-11-14
6
959 Views
Last Modified: 2008-02-01
How do I add commas as an acceptable character to this RegEx definition set?

Dim regEx
Set regEx = New RegExp
regEx.Global = true
regEx.Pattern = "[^0-9a-z A-Z@._-]"

Thanks!
0
Comment
Question by:bsowards
  • 3
  • 3
6 Comments
 
LVL 18

Expert Comment

by:Morcalavin
ID: 17939714
Have you tried this?
regEx.Pattern = "[^0-9a-z A-Z@._-,]"
0
 

Author Comment

by:bsowards
ID: 17939719
Yes, it failed
0
 
LVL 18

Expert Comment

by:Morcalavin
ID: 17939729
Try this:
regEx.Pattern = "[^0-9a-z A-Z@._-\,]"
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:bsowards
ID: 17939742
Microsoft VBScript runtime  error '800a139d'

Invalid range in character set

/forms/contact_submit.asp, line 20
0
 
LVL 18

Accepted Solution

by:
Morcalavin earned 250 total points
ID: 17939778
Oh i see.  - is a special character.  escape it.
regEx.Pattern = "[^0-9a-z A-Z@._\-,]"
0
 

Author Comment

by:bsowards
ID: 17939791
Thank You!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now