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 
Return to the default flat view Create a new topic Submit Reply
Re: idl/gdl/strmatch [message #69560 is a reply to message #69559] Thu, 21 January 2010 09:18 Go to previous messageGo to previous 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))
[Message index]
 
Read Message
Read Message
Read Message
Read Message
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: Sat Oct 11 16:11:17 PDT 2025

Total time taken to generate the page: 1.75921 seconds