Solved

Add Comma to this RegEx

Posted on 2006-11-14
6
963 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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 would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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