--- "John W. Krahn" <[EMAIL PROTECTED]> wrote:

> chen li wrote:
> > Hi all,
> 
> Hello,
> 
> > I write a small script as follows:
> > 
> > use strict;
> > use warnings;
> > 
> > my $file_name='OT-q1.001';
> > 
> > if ($file_name=~/(OT)*.(\d+$)/){
> >          print "find it\t $file_name";
> > }else {print "No math";}
> > 
> > The problem is that it also macth the following
> > string:
> > 
> > my $file_name='I:/Common/Notebooks/Trans10C.032';
> > (ot in the Notebook)
> 
> 'ot' and 'OT' are not the same string so it won't
> match.
> 
> 
> John

Hi John,

This is what get from the screen:

C:\Perl\self\beginner>perl reg1.pl
find it  I:/Common/Notebooks/Trans10C.032

Li

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to