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

Home » Public Forums » archive » Re: 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 #78460 is a reply to message #78454] Wed, 23 November 2011 10:21 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Vincent Sarago writes:

> 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

Yeah, sorry. Big holiday coming up and company arriving shortly.
Maybe next week. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Faster way to search/split a string?
Next Topic: Contour dimension problem

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

Current Time: Wed Oct 29 10:09:46 PDT 2025

Total time taken to generate the page: 1.51951 seconds