comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: extracting numbers
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: extracting numbers [message #48026] Thu, 23 March 2006 08:06 Go to previous message
Norbert Hahn is currently offline  Norbert Hahn
Messages: 46
Registered: May 2003
Member
kl_tah@hotmail.com wrote:

> Hi, does anyone happen to know how to extract a sequence of numbers
> (including the sign) between two characters? for eg. I have
>
> AAAA = -23.445 /BBBBB
> and could like to extract the number between '=' and '/'
>
> cheers,

Depending on the positions in the string you may as well _read_ from a
string using the procedure reads:

buffer = "AAAA = -23.445 /BBBBB"
reads, buffer, z, format='(6x,f8.3)'
help, z
Z FLOAT = -23.4450

HTH
Norbert
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Envi display bands
Next Topic: Azimuth and Offset XYZ position correction

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 10:48:21 PDT 2025

Total time taken to generate the page: 0.88172 seconds