[Top] [All Lists]

Extract the desired value from a regex

Subject: Extract the desired value from a regex
From: Manasi Bopardikar
Date: Fri, 18 Jul 2008 09:22:02 +0530
Newsgroups: perl.beginners

 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,

Manasi Bopardikar|s/w Engineer|Persistent SystemsLtd


[email protected]


This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.
<Prev in Thread] Current Thread [Next in Thread>