[Javascript] regular expessions question

Peter Brunone peter at brunone.com
Thu May 3 09:43:48 CDT 2001


regular expessions questionBrett,

    I don't know much about regular expressions, but this task is easy to perform with a single loop.  Just iterate through the string by character -- going from 0 to the .length property -- and check sValidChars.indexOf(theCurrentCharacter) .  If it's >= 0, you know that the character is part of your "acceptable" string.
    Let me know if you have any further questions.

Cheers,

Peter
  ----- Original Message ----- 
  From: Brett Lawrence 
  To: javascript at LaTech.edu 
  Sent: Thursday, May 03, 2001 6:20 AM
  Subject: [Javascript] regular expessions question


  Hi 

  Can anyone tell me how I can test to see if a string contants only all or some of these characters  

  sValidChars = "@{}[]0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,- "; 



  Thanks Brett 

  IMPORTANT DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by another person is not permitted. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010503/75d2f845/attachment.htm>


More information about the Javascript mailing list