Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: quick strsp...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 5510 of 6454
Post > Topic >>

Re: quick strsplit question

by Spon <christoph.blau@[EMAIL PROTECTED] > Mar 6, 2008 at 02:07 AM

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
 




 4 Posts in Topic:
quick strsplit question
rlayberry@[EMAIL PROTECTE  2008-03-06 01:47:34 
Re: quick strsplit question
Spon <christoph.blau@[  2008-03-06 02:07:42 
Re: quick strsplit question
Nigel Wade <nmw@[EMAIL  2008-03-06 10:25:50 
Re: quick strsplit question
rlayberry@[EMAIL PROTECTE  2008-03-07 05:56:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 14:06:48 CST 2008.