-- Forwarded message --
From: Anshul Saxena <[EMAIL PROTECTED]>
Date: Oct 23, 2006 8:38 AM
Subject: Re: reg expression again
To: chen li <[EMAIL PROTECTED]>
You should try :
my $file_name =~ /^(OT).*(\d+$)/
The caret ^ when outside any brackets, indicates that the c
--- Robin Sheat <[EMAIL PROTECTED]> wrote:
> On Monday 23 October 2006 12:37, chen li wrote:
> > my $file_name='OT-q1.001';
> >
> > if ($file_name=~/(OT)*.(\d+$)/){
> Maybe you mean:
> if ($file_name=~/^OT.*\.(\d+$)/){
>
Thank you and it is what I want.
Li
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
> st
Hi all,
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.
On Monday 23 October 2006 12:37, chen li wrote:
> my $file_name='OT-q1.001';
>
> if ($file_name=~/(OT)*.(\d+$)/){
Maybe you mean:
if ($file_name=~/^OT.*\.(\d+$)/){
--
Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]>
Hostes alienigeni me abduxerunt. Qui annus est?
PGP Key 0xA99CEB6D = 595
--- "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";
> > }e