logo       

How to extract Numbers: msg#00066

editors.sed.user

Subject: How to extract Numbers

Hi all,
I've a string like this

AAAxx.yy
where AAA are letters and xx and yy are numbers. I want to extract xx.yy
from the string. I'm doing some thing like this.

echo abc12.34 | sed -e 's|^\D*\(\d.*\)|\1|g'

but the result i'm getting is abc12.34 only. Where am i doing wrong ?

Thx in advance,
Surya









------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/dkFolB/TM
--------------------------------------------------------------------~->

--

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/sed-users/

<*> To unsubscribe from this group, send an email to:
sed-users-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise