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

Home » Public Forums » archive » Removing (or replacing) substrings in a string array
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: Removing (or replacing) substrings in a string array [message #87279 is a reply to message #87262] Wed, 22 January 2014 13:12 Go to previous messageGo to previous message
jimuba is currently offline  jimuba
Messages: 9
Registered: February 2009
Junior Member
FWIW, here is an approach that combines the strings in the array, adding in a separator character that doesn't appear in the original string (in this example a '\'), and then splitting up the joined string at one or more periods or at the added separator character:

s = STRJOIN(aStringArr, '\')
result = STRSPLIT(s, '\.+|\\', /REGEX, /EXTRACT)

I hope this helps,
Jim (Exelis VIS)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: keyword inheritance question
Next Topic: Plotting points in fainter color on an IDL plot

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

Current Time: Wed Oct 08 18:04:33 PDT 2025

Total time taken to generate the page: 0.00449 seconds