On Friday, June 13, 2003, at 03:08 PM, Madhu Reddy wrote:

Hi,

Howdy.


   I want to find and replace string with particular
pattern


my $str = " 13 A.MFDF_FEEDER_ET"; $str =~ s/\s+//g;

here i want to replace string that end with "_ET" with
null....

basically i wanto get result 13 in $str.

how to do this?

If you're only interested in the number, try changing your second line to:


$str =~ s/^\D+(\d+)\D+$/$1/;

Hope that helps.

James

I really appreciate u r help

Thanks
-Madhu





__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to