sanket vaidya wrote:
From: Manasi Bopardikar [mailto:[EMAIL PROTECTED]
Hi,
I have a regex --- $array[3]=~/[M|T|W|TR|F]\s[M|T|W|TR|F]\s(.*?)/;
I want to extract the value of expression highlighted in red.Is there any
way to do it.
You want to capture character "?" means zero or one time r
Manasi Bopardikar wrote:
Hi,
Hello,
I have a regex --- $array[3]=~/[M|T|W|TR|F]\s[M|T|W|TR|F]\s(.*?)/;
I want to extract the value of expression highlighted in red.
My email reader only displays black text on a white background, there is
no "red" here. If you could show us the actual pat
Manasi Bopardikar wrote:
I have a regex --- $array[3]=~/[M|T|W|TR|F]\s[M|T|W|TR|F]\s(.*?)/;
That regex makes little sense; you need to read up on [...] style
character classes. And ending the regex with a non-greedy (.*?) will
probably make it not capture anything.
perldoc perlre
I w
s"
Output:
time = 8:00AM - 10:20
days = M,W
-Original Message-
From: Manasi Bopardikar [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2008 10:06 AM
To: 'sanket vaidya'
Subject: RE: Extract the desired value from a regex
String is
M W 8:00AM - 10:20
I want to put M,W in days
o capture &
what to capture?
Thanks & Regards,
Sanket Vaidya
Patni Computer Systems Limited
-Original Message-
From: Manasi Bopardikar [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2008 9:52 AM
To: 'sanket vaidya'
Subject: RE: Extract the desired value from a regex
Ca
--Original Message-
From: Manasi Bopardikar [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2008 9:22 AM
To: beginners@perl.org
Subject: Extract the desired value from a regex
Hi,
I have a regex --- $array[3]=~/[M|T|W|TR|F]\s[M|T|W|TR|F]\s(.*?)/;
I want to extract the value of expression hig
Hi,
I have a regex --- $array[3]=~/[M|T|W|TR|F]\s[M|T|W|TR|F]\s(.*?)/;
I want to extract the value of expression highlighted in red.Is there any
way to do it.
-I tried $1 does not work.Why doesn't it work I do not understand.
Is there any other way to do it.
Thanks and Regards,
Man