How about:

     my $myvar = qq(<the text you wish to parse>);

     $myvar=~s/tools:(.*?)# Not a//sg; print $1;

John

From: "Sidharth" <[EMAIL PROTECTED]>
> hi all ,
> consider the contentes of file as below
>
> =======================================
> tools:
> #  Phony target (prerequisite of .PHONY).
> #  Implicit rule search has not been done.
> #  File does not exist.
> #  File has not been updated.
> #  commands to execute (from `Makefile', line 52):
> @$(ECHO)
> @$(ECHO)
> @$(ECHO) "
> @$(PERL)
> @$(PERL) -(!\$$apv) {
> @$(NVC) /v
> @$(ECHO) -n "Scramp: "
> @$(SCRAMP) -? | $(GREP) -i version
> @$(UIREZ) -v | $(TOPLINE)
> @$(PACK) -version | $(TOPLINE)
> @$(ECHO) "              >>>>Cygwin tools<<<<"
> @$(MAKE) --version | $(TOPLINE)
> @$(CAT) --version | $(TOPLINE)
> @$(CP) --version | $(TOPLINE)
> @$(CPP) --version | $(TOPLINE)
> @$(GREP) --version | $(TOPLINE)
> @$(MKDIR) --version | $(TOPLINE)
>
> # Not a target:
>
> @$(MV) --version | $(TOPLINE)
> @$(RM) --version | $(TOPLINE)
> @$(TEE) --version | $(TOPLINE)
> @$(ECHO) "             @$(ARMCC) -vsn
> @$(CC) -vsn
> @$(ASM) -vsn
> @$(PERL) -e "error
> @$(AR) -vsn
> @$(HEXTOOL) -vsn
> @$(ECHO) "-------------------------------------------------"
> @$(ECHO) " "
>
>
>
> ========================================
>
>
> how  to  print  all the line between  tools:   and  # Not a target: only
>
> output shoul be
>
> #  Phony target (prerequisite of .PHONY).
> #  Implicit rule search has not been done.
> #  File does not exist.
> #  File has not been updated.
> #  commands to execute (from `Makefile', line 52):
> @$(ECHO)
> @$(ECHO)
> @$(ECHO) "
> @$(PERL)
> @$(PERL) -(!\$$apv) {
> @$(NVC) /v
> @$(ECHO) -n "Scramp: "
> @$(SCRAMP) -? | $(GREP) -i version
> @$(UIREZ) -v | $(TOPLINE)
> @$(PACK) -version | $(TOPLINE)
> @$(ECHO) "              >>>>Cygwin tools<<<<"
> @$(MAKE) --version | $(TOPLINE)
> @$(CAT) --version | $(TOPLINE)
> @$(CP) --version | $(TOPLINE)
> @$(CPP) --version | $(TOPLINE)
> @$(GREP) --version | $(TOPLINE)
> @$(MKDIR) --version | $(TOPLINE
>
> thank u all in advance

--
John Harrington
Sr. Scientific/Technical Writer, ID
Accelrys Inc.
phone: 858 799 5576
fax: 858 458 0136
cell: 760 213 9183 (Mondays & Tuesdays)

-- 
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