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

Home » Public Forums » archive » Stregex question - extracting substring
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 question - extracting substring [message #87013 is a reply to message #87008] Thu, 19 December 2013 14:31 Go to previous messageGo to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
OK, how about a STREGEX solution:

str = ['xxxxxxx:yyy', 'xxxxxxx:yyyyyyy', 'x:yyyy'] ;define the string array

yStrColon = STREGEX(str, ':.+$', /EXTRACT) ;get everything past the colon, including the colon

yStr = STRMID(yStrColon, 1) ;strip the colon

About that regular expression:

: get the substring starting with the colon
.+ get one or more instances of the "dot" (so, any character)
$ anchor at the end of the string
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL 8.3 released
Next Topic: Problems with Retain on OS X Mavericks

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

Current Time: Thu Oct 09 21:34:56 PDT 2025

Total time taken to generate the page: 0.95921 seconds