: I thought this was working, but my logs just showed a case
where it seems not to do what I want.
: Why does:
:
$OK_body=($body=~/library\s*?card\D*?(\d{7})\D/i) ;
: Not become true when
$body contains:
: Library Card: 0240742
Probably because your regex explicitly requires a non-digit (\D) at the end, and your example line doesn't have it. Perhaps you want \D*$ so it finds no more than 7 digits, or if more digits are allowed as long as a non-digit intervenes, you might want (\D|$).
Good luck,
Joe
==============================================================
Joseph P. Discenza, Sr.
Programmer/Analyst
mailto:[EMAIL PROTECTED]
Carleton Inc. http://www.carletoninc.com
574.243.6040 ext. 300 fax: 574.243.6060
Providing
Financial Solutions and Compliance for over 30
Years
_______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs