[OT] Regular Expressions

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 49872
interpreted = N
texte = I'm trying to use a regular expression in a javascript to test an email input field in a form like this:var goodEMAIL = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/How can I modify this script to check like this:One or more of the following: Lowercase letter, uppercase letter, digit, underscore, period, or hyphen+++ PLUS +++The @ symbol+++ PLUS +++One or more of the following: Lowercase letter, uppercase letter, digit, or hyphen+++ PLUS +++Zero or more of the following: Period+++ PLUS +++2-4 instances of the following: Lowercase letter or uppercase letterI thought this script was supposed to act as specified above, but I'm able to enter something like a@aaaa with no problems, but a@a.a fails. The 2-4 character check at the end doesn't appear to be working. I'm sure one of the veteran C programmers can answer this with no problem. TIA! --------------------------------------------------------------------- Clint Davis Webmaster / Interactive Media Specialist Gray Loon Marketing Group, Inc. http://www.grayloon.com 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999 --------------------------------------------------------------------- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [OT] Regular Expressions (Clint Davis 2003)
  2. Re: [OT] Regular Expressions (John Peacock 2003)
  3. [OT] Regular Expressions (Clint Davis 2003)
I'm trying to use a regular expression in a javascript to test an email input field in a form like this:var goodEMAIL = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/How can I modify this script to check like this:One or more of the following: Lowercase letter, uppercase letter, digit, underscore, period, or hyphen+++ PLUS +++The @ symbol+++ PLUS +++One or more of the following: Lowercase letter, uppercase letter, digit, or hyphen+++ PLUS +++Zero or more of the following: Period+++ PLUS +++2-4 instances of the following: Lowercase letter or uppercase letterI thought this script was supposed to act as specified above, but I'm able to enter something like a@aaaa with no problems, but a@a.a fails. The 2-4 character check at the end doesn't appear to be working. I'm sure one of the veteran C programmers can answer this with no problem. TIA! --------------------------------------------------------------------- Clint Davis Webmaster / Interactive Media Specialist Gray Loon Marketing Group, Inc. http://www.grayloon.com 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999 --------------------------------------------------------------------- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Clint Davis

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Formating found categories (1997) Date problems-more (1997) Return records from another (1997) MATH (1998) [LOOKUP] (1997) problems with WebCat-Plugin () Exclamation (2002) Searching multiple fields from one form field (1997) [protect] error page (1997) No Access warning when caching HTML files (1997) Cant open pages generated by Webcat (2004) Can't get appendfile to work (1997) Dummy Credit Card Number for debug? (1997) Emailer (WebCat2) (1997) Searching multiple Databases (1997) Cookies (1999) WebMerchant Mac 3.0 beta available (1998) international time (1997) Log-in Scheme (2003) PIXO (1997)