On Mar 6, 9:47 am, rlaybe...@[EMAIL PROTECTED]
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


|