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 #49349 is a reply to message #49347] Thu, 20 July 2006 04:13 Go to previous messageGo to previous message
ChristopherFlorio is currently offline  ChristopherFlorio
Messages: 23
Registered: April 2006
Junior Member
Michael Galloy wrote:
> 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

The desired output is "Earth2". I want to eliminate all 'filter'
information from 'file'.
[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 13:45:19 PDT 2025

Total time taken to generate the page: 1.51912 seconds