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]

Reply via email to