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

Home » Public Forums » archive » quick strsplit question
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: quick strsplit question [message #59221 is a reply to message #59073] Thu, 06 March 2008 02:07 Go to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Mar 6, 9:47 am, rlaybe...@hotmail.com wrote:
> Hi
>
> I am, trying to split an number of terms such as str9=dg_eyemouth.out
>
> to take off the file extension
>
> print,strsplit(str9,'.out',/extract,/regex)
>
> but this gives
>
> dg_eye h
>
> any ideas
>
> thanks
>
> russ

You want:
print,strsplit(str9,'\.out',/extract,/regex)

The '.' is a special character in regular expressions in IDL and needs
an escape character before it if you mean an actualy '.' in a string.
See the helpfile entitled 'Learning About Regular Expressions'.

Regards,
Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Workspace unavailable
Next Topic: end-of-line termination

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

Current Time: Sun Oct 12 01:03:04 PDT 2025

Total time taken to generate the page: 0.01276 seconds