in reply to Re: Matching hashes
in thread Matching hashes

Oh great! Thanks for the code u just laid down, I will go through this and see if it works, it look quire promising. The files are in plain text file with about 5000 entries in each, so not too sure how memory sapping this would be. But because I am only looking for the first elements in the column i.e 1021 from :(102l,0,GLU,,11,S,PSIBLAST,206l) do I need a regex to distinguish it e.g /^\d+\w{3}/ ? Ada

Replies are listed 'Best First'.
Re^3: Matching hashes
by davido (Cardinal) on Dec 05, 2007 at 18:42 UTC

    5000 hash entries of a four digit key won't be a problem for any computer built in this century.

    You don't need a regex. Sure, you can use one, but my split accomplishes the same thing more clearly, in my opinion. I just split on ',' and then select the first element of the split. That isolates your index number.

    My solution ought to work as long as your data set matches your description, and as long as I didn't inadvertently impose some typos into my code. ;)


    Dave

    A reply falls below the community's threshold of quality. You may see it by logging in.