David wrote:
>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
>Just possibly there's some dodgy html or something in the original that
>doen't make it through to my logs, but right now I'm perplexed
Is there a chance that 'Library Card: 0240742' comes at the end of the file?
Or that you used chomp on the variable $body?
The \D at the end of the regular expression would not work if there wasn't a
nondigit at the end of the line.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs