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

Home » Public Forums » archive » Using STREGEX/STRMID
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Using STREGEX/STRMID [message #71283] Wed, 09 June 2010 11:19
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
Hello,

I'd like to get the "label" (i.e. 1033) from this string:

IDL> str = '; ROI name: EVF: Layer: pts_slant.shp (Label=1033)'

...and I was wondering if there is a more elegant/efficient way of
doing this than:

IDL> pos0 = stregex(str, '=')+1
IDL> posn = stregex(str, ')')
IDL> print, strmid(str, pos0, posn-pos0)

IDL prints:

1033

Thanks!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL reading grib data on 64bit-machine
Next Topic: Problem with creating executable files for scripts using envi functions

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

Current Time: Wed Oct 08 18:56:30 PDT 2025

Total time taken to generate the page: 0.00602 seconds