Thanks Rob
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 21, 2007 4:33 PM
To: beginners @ perl. org
Cc: Sayed, Irfan (Irfan)
Subject: Re: Regular expression to get part of string
Sayed, Irfan (Irfan) wrote:
>
> I have one variable whi
Thanks Jeff
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff
Pang
Sent: Wednesday, November 21, 2007 4:26 PM
To: Sayed, Irfan (Irfan)
Cc: beginners @ perl. org
Subject: Re: Regular expression to get part of string
On Nov 21, 2007 6:47 PM, Sayed
Sayed, Irfan (Irfan) wrote:
I have one variable which has the value as follows
"ccvob01pts/2Nov 21 12:17 (135.27.157.38 logged in ."
Now I want only "ccvob01" from that string so I wrote reg.exp. as
follows
my ($usr1)=($usr =~ m{(.+)\S$}); where $usr contains above string
On Nov 21, 2007 6:47 PM, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have one variable which has the value as follows
>
> "ccvob01pts/2Nov 21 12:17 (135.27.157.38 logged in ."
>
> Now I want only "ccvob01" from that string so I wrote reg.exp. as
> follows
try
Hi All,
I have one variable which has the value as follows
"ccvob01pts/2Nov 21 12:17 (135.27.157.38 logged in ."
Now I want only "ccvob01" from that string so I wrote reg.exp. as
follows
my ($usr1)=($usr =~ m{(.+)\S$}); where $usr contains above string.
But still I am not