Solved

Add Comma to this RegEx

Posted on 2006-11-14
6
955 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

9 Experts available now in Live!

Get 1:1 Help Now