<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>regular expessions question</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Brett,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> 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.</FONT></DIV>
<DIV><FONT face=Arial size=2> Let me know if you have any
further questions.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Peter</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=BrettL@datent.com href="mailto:BrettL@datent.com">Brett Lawrence</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@LaTech.edu
href="mailto:javascript@LaTech.edu">javascript@LaTech.edu</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, May 03, 2001 6:20
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Javascript] regular expessions
question</DIV>
<DIV><BR></DIV>
<P><FONT face=Arial size=2>Hi</FONT> </P>
<P><FONT face=Arial size=2>Can anyone tell me how I can test to see if a
string contants<B> only</B> all or some of these characters </FONT></P>
<P><FONT face=Arial>sValidChars =
"@{}[]0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,- ";
</FONT></P><BR>
<P><FONT face=Arial size=2>Thanks Brett</FONT> </P>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. </BLOCKQUOTE></BODY></HTML>