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

Home » Public Forums » archive » Re: again strsplit
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: again strsplit [message #37745 is a reply to message #37734] Wed, 21 January 2004 08:42 Go to previous messageGo to previous message
savoieNoSpam is currently offline  savoieNoSpam
Messages: 1
Registered: January 2004
Junior Member
Reimar Bauer <R.Bauer@fz-juelich.de> writes:

> Hi all
>
> I have learned the /regex keyword but who could explain this:
>
> a='ABC$DEF'
> print,strsplit(a,'$',/extr)
>
> ABC DEF
>
> and
>
> a='ABC$DEF'
> print,strsplit(a,'$',/extr,/regex)
>
> ABC$DEF
>
>
> Why is this differnt?

Because '$' is the regular expression for end of line. If you want to have
the actual dollar sign, you need to escape it with a back slash first.

IDL> print,strsplit(a,'\$',/extr,/regex)
ABC DEF

Helps?

Matt

--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: "Color vectors" & shading
Next Topic: Re: write unix textfile with windows idl

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

Current Time: Sat Oct 11 07:00:57 PDT 2025

Total time taken to generate the page: 0.01290 seconds