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

Home » Public Forums » archive » Re: String Spliting
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: String Spliting [message #49353 is a reply to message #49349] Wed, 19 July 2006 13:03 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
ChristopherFlorio@gmail.com wrote:
> Actually now I am having a new problem. I want to put text on the other
> side of the asterisk.
>
> file='ImageEarth2.img'
> filter='Image*.img'
>
> file=STRJOIN(STRSPLIT(file,filter,/EXTRACT,/REGEX))
> file='ImageEarth2.img'
>
> with file=STRJOIN(STRSPLIT(file,filter,/EXTRACT))
> file='Erth2'
>
> Any Suggestions?
>

The desired output is 'ImageEarth2'? I'm not sure what the entire line
looks like, but how about this?

IDL> file = 'ImageEarth2.img'
IDL> s = stregex(file, '([[:alnum:]]+)\.img', /extract, /subexpr)
IDL> print, s[1]
ImageEarth2

Mike
--
www.michaelgalloy.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Surface plots in spherical coordinates
Next Topic: Re: mpfitexpr using functargs

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

Current Time: Fri Oct 10 19:33:54 PDT 2025

Total time taken to generate the page: 0.95999 seconds