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 would guess that you actually want: $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.
Nothing is highlighted in red in my email client. Don't try to use that kind of formating on a mailing list.
-I tried $1 does not work.Why doesn't it work I do not understand.
If the above suggestion does not meet your expectations, please post a short but complete program that shows what you are actually trying to do.
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/