On Jul 23, KEVIN ZEMBOWER said: >Jeff and John, thanks for your help. I'm invoking my script with a >command line loop: perl -n pop2html.pl 2001-07-16.txt > >The file pop2html.pl, incorporating your suggestion, is: >if (! /[a-z]/) {chomp; print "<h4>$_</h4>\n"; next;} >if (/^\s*$/) { print "<br>\n"; next;} > >The output of the program is: ><h4>WOMEN'S HEALTH</h4> ><h4></h4> Well, you should re-arrange your order of tests! If the string is made up of ONLY whitespace (like your second test, /^\s*$/, checks), then it ALREADY matches the !/[a-z]/ test. Re-arrange them. -- 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 12:49:43 -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
- Jeff 'japhy/Marillion' Pinyan