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 #37749 is a reply to message #37748] Wed, 21 January 2004 06:46 Go to previous messageGo to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Reimar Bauer wrote:
> 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?
>

Hi Reimar,

Funny, I was just fiddling with this, too.

I assume that you want to split the string into substrings using the '$'
character. To do so, you need to use the escape character
(backslash)before the '$' since '$' is also a REGEX control character.

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

Cheers,
Ben
[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: Sun Oct 12 00:33:19 PDT 2025

Total time taken to generate the page: 1.04196 seconds