Hi Frnds,
I found some solution for  my problem.
============================
foreach $line2 (@objects)
      {
        chomp($line2);
        if ($line2 =~ /^\s*\(\s*ObjectClass\s*"(.+?)"\s*\)/)
          {
            $var=$1;
================================

Arjun


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 11, 2004 10:07 AM
To: [EMAIL PROTECTED]
Subject: Reg..Regular expression



Hi Frnds,
I need to extract a string from every line of a file which are present
in a array.

The string to be extracted is  present in between double quotes. I am
using below code and it is not working. ====================== foreach
$line2 (@objects)
      {
        chomp($line2); <----------- To remove the new line at the end
        print "Function been called and object is ---- $line2\n";
        $var = /^\s*\(\s*ObjectClass\s*"(.+?)"\s*\)/;
<------------------------I think here some where i need to mention
$line2 on right hand side.......??????
=========================================


Please suggest some solution ..........




thanks in advance
Arjun







Confidentiality Notice


The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain confidential or privileged information. If you are not
the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately and destroy all copies of this message
and any attachments.



Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to