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

Home » Public Forums » archive » Re: idl/gdl/strmatch
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: idl/gdl/strmatch [message #69548] Thu, 21 January 2010 12:00 Go to next message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jan 21, 3:29 pm, a <oxfordenergyservi...@googlemail.com> wrote:
> thanks.  i may try that.  i wrote a function that does it via the
> commmand line, but a bit ugly
>
> any ideas for a gdl strsplit('aaa   bbbb',/extract)??

strsplit exists in GDL. Maybe you are using an older version?

Anyway, you may find this reference useful

http://michaelgalloy.com/2009/12/01/routines-currently-avail able-in-gdl.html
Re: idl/gdl/strmatch [message #69559 is a reply to message #69548] Thu, 21 January 2010 09:29 Go to previous messageGo to next message
oxfordenergyservices is currently offline  oxfordenergyservices
Messages: 56
Registered: January 2009
Member
On 21 Jan, 17:18, pp <pp.pente...@gmail.com> wrote:
> On Jan 21, 1:58 pm, a <oxfordenergyservi...@googlemail.com> wrote:
>
>> The only problem I have so far is that strmatch which I use a load of
>> times isn't in gdl.  Are there any simple workarounds?
>
> GDL has stregex, which can do what strmatch does, and much more.
>
>
>
>> I need the wilcard to work ie
>
>> a=['abc','def',ghi']
>
>> b='*e*'
>
>> i=where(strmatch(a,b) eq 1)
>
>> gives i=1
>
> That particular example can be done with
>
> b='e'
> i=where(stregex(a,b,/boolean))

thanks. i may try that. i wrote a function that does it via the
commmand line, but a bit ugly

any ideas for a gdl strsplit('aaa bbbb',/extract)??

Thanks

Russ
Re: idl/gdl/strmatch [message #69560 is a reply to message #69559] Thu, 21 January 2010 09:18 Go to previous messageGo to next message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jan 21, 1:58 pm, a <oxfordenergyservi...@googlemail.com> wrote:
> The only problem I have so far is that strmatch which I use a load of
> times isn't in gdl.  Are there any simple workarounds?

GDL has stregex, which can do what strmatch does, and much more.

>
> I need the wilcard to work ie
>
> a=['abc','def',ghi']
>
> b='*e*'
>
> i=where(strmatch(a,b) eq 1)
>
> gives i=1

That particular example can be done with

b='e'
i=where(stregex(a,b,/boolean))
Re: idl/gdl/strmatch [message #69652 is a reply to message #69548] Wed, 27 January 2010 06:11 Go to previous message
oxfordenergyservices is currently offline  oxfordenergyservices
Messages: 56
Registered: January 2009
Member
On 21 Jan, 20:00, pp <pp.pente...@gmail.com> wrote:
> On Jan 21, 3:29 pm, a <oxfordenergyservi...@googlemail.com> wrote:
>
>> thanks.  i may try that.  i wrote a function that does it via the
>> commmand line, but a bit ugly
>
>> any ideas for agdlstrsplit('aaa   bbbb',/extract)??
>
> strsplit exists inGDL. Maybe you are using an older version?
>
> Anyway, you may find this reference useful
>
> http://michaelgalloy.com/2009/12/01/routines-currently-avail able-in-g...

thanks. it didn't come with the package i downloaded straight onto
ubuntu. version 0.9 i think
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Map projection header file question
Next Topic: Re: current directory changes unexpectedly

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

Current Time: Wed Oct 08 20:03:13 PDT 2025

Total time taken to generate the page: 0.39555 seconds