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

Home » Public Forums » archive » Re: bug in stregex?
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: bug in stregex? [message #31531 is a reply to message #31529] Fri, 19 July 2002 14:53 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Vapuser wrote:
>
> I don't you, you tell me. Is this a bug?
>
> IDL> tt=stregex('cdefaz',"(.*)(a|b|c)z",/extract)
> IDL> help,tt
> TT STRING = 'cdefaz'
>
> My understanding of regular expressions says it's a bug. The first
> '(.*)' should only match up to the 'a' and the second subexpression,
> since it is *unqualified*, should handle the 'az', i.e. TT should
> have two parts. tt[0] should be 'cdef' and tt[1] should be 'a.'

Try:

print,stregex('cdefaz',"(.*)([abc]z)",/subexpr,/extract)
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: where are the user defined macros saved?
Next Topic: Urgent help! Could anyone send me a simple algorithm for Maximum Intensity Projection(MIP)?

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

Current Time: Fri Oct 10 14:15:15 PDT 2025

Total time taken to generate the page: 0.87962 seconds