On Jul 23, Teresa Raymond said:
>How would you correct this expression to accept only alpha/numeric
>except the @ and . (period) symbols? In other words, how would I add
>multiple chars to exclude to the regex?
Err, you mean "accept only alphanumerics AND @ and .".
>if ($name=~/^W&&[^@]]+$/)
>{ print "Only the @ and . characters are allowed";
>}
You're missing some characters in there...
if ($name =~ /[^\w@.]/) {
# character other than A-Z, a-z, 0-9, _, @, ., and local letters used
}
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
** Manning Publications, Co, is publishing my Perl Regex book **
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]