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

Home » Public Forums » archive » Faster way to search/split a string?
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: Faster way to search/split a string? [message #84637 is a reply to message #78484] Wed, 23 November 2011 10:15 Go to previous message
Vincent Sarago is currently offline  Vincent Sarago
Messages: 34
Registered: September 2011
Member
I'm not sure to understand, maybe with examples it will be easier to me.


tmp = stregex(all_rows, '^[a-zA-Z0-9]{20}',/extract) ; Array of all IDs

test = uniq[sort(tmp)] ; Array determining witch ID is uniq

for ii = 0, n_elements(test) - 1 do begin

id = tmp[test[ii]]

test = where(tmp eq id, count)
if count ne 0 then begin
tmp2 = strsplit(all_rows[test], '',/extract) ; Array of ID + Other but split

void = all_rows[test] ; all row for uniq ID
subset = stregex(b[ii], string(id[ii], format='("[^",a,"].+")'), /extract)
;do what you need to do here



endif

endfor
[Message index]
 
Read Message
Read Message
Previous Topic: IDL QUESTIONS (INTERPOLATION)
Next Topic: Re: Faster way to search/split a string?

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

Current Time: Thu Oct 09 22:06:59 PDT 2025

Total time taken to generate the page: 0.64118 seconds