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

Home » Public Forums » archive » Re: stregex - lookaround operators?
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: stregex - lookaround operators? [message #56685 is a reply to message #56348] Mon, 12 November 2007 03:59 Go to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Oct 18, 4:53 pm, rtow...@gmail.com wrote:
> Thanks Chris,
>
> I ended up pretty much doing the same thing you did but I used
> STRSPLIT or STRMID depending on my mood.
>
> rid= STREGEX(dg.dgram, '[0-9]*</rid>', /EXTRACT)
> rid = LONG((STRSPLIT(rid, '<'))[0])
>
> xcvrs = STREGEX(dg.dgram, '[ a-zA-Z0-9,\-]*</value>', /EXTRACT)
> xcvrs = STRMID(xcvrs, 0, STRLEN(xcvrs) - 8)

Ok, how about this?

regex='>([^>]*)<\rid>'
test=stregex(strexpr,regex,/extr,/sub)
print,transpose((test(1,*))[where(test(1,*)ne'')])

So long as you only get one sub-expression per string, it should work.
Spon
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Writing an IDL application using a C++ data model.
Next Topic: icontour scaling color table

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

Current Time: Sat Oct 11 23:39:06 PDT 2025

Total time taken to generate the page: 0.62588 seconds