in reply to Comparing lower to upper case
if ($str =~ m/\d[a-zA-Z]\d+/) { print "Ok!\n"; } else { print "Invalid format! Must be: [digit][letter][digit][digit] ... \n +"; }
open(I,$0);<I>;$~=$/;$/='~';$_=<I>;($/)=/(.)$~/;s/[$~~]//g;/(v)/;$-=$-[0];s;\Q$/\E;$~;g;($/,$^)=/^(.)(.)/;
#% xxxxxx xx-+ xx xxx xx xx xx xx xxx xxxxx+ xx xx xxxx xxxxx ......+
#x xxxxvxxx xx xx xv xxxx x+ %+ ===== xx xx xx xx x+ =x xx xx xx xx xx ...+
#x xx xx xx xx xx xx xx xx xxx+ xxxxxx xx +x xx xx+x- xxxx xxxx ........+
#% xx xx xx xx xx xx xx x+ xx xx =+=== xx xx xxxx-xx xx =x +x xx xx xx xx ...+
#% xx xx xx -+x+ xxx+ xx xx xx xx xx x+ xx xxx+xx xx xx xxxx xx xx ....+~
for(split/$~/){s,[ $/],,g;/(.)$/;$l=$-[0];/(.)/||next;$_=chr$-+$l;$".=($1=~/$^/)?" \u$_":$_;}print$";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Comparing lower to upper case
by jsprat (Curate) on Jun 11, 2002 at 18:44 UTC | |
|
Re: Re: Comparing lower to upper case
by joshua (Pilgrim) on Jun 11, 2002 at 19:01 UTC | |
|