On Jul 23, KEVIN ZEMBOWER said:
>I need help writing a regular expression that will match lines that have
>only upper case letters, and sometimes slashes and spaces, but won't
>match lines with mixed case.
>
>Lines that must be matched are like:
>FAMILY PLANNING / REPRODUCTIVE HEALTH POLICY
>FAMILY PLANNING / REPRODUCTIVE HEALTH PROJECTS
>PUBLIC HEALTH
>HIV/AIDS
You should probably just use a regex like:
if ($line !~ /[a-z]/) {
# it's ok
}
That regex says "if $line does NOT contain a lower-case letter, let it
pass."
--
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]
Re: Need regex to match all UPPERCASE letters?
Jeff 'japhy/Marillion' Pinyan Mon, 23 Jul 2001 06:35:49 -0700
- Need regex to match all UPPERCASE letters? KEVIN ZEMBOWER
- RE: Need regex to match all UPPERCASE l... Chris Mulcahy
- RE: Need regex to match all UPPERCASE l... Jeff 'japhy/Marillion' Pinyan
- RE: Need regex to match all UPPERCASE l... John Edwards
- Re: Need regex to match all UPPERCASE l... KEVIN ZEMBOWER
- Re: Need regex to match all UPPERCA... Jeff 'japhy/Marillion' Pinyan
