It's a simple problem, but cant find the answer. I'm pulling in file names. The file names are 123A, 123B, 124A, 125A. There can be multiple files with the same number, but different letters (like part 123, revision A, revision B, etc). They all come in as a single 1-dimensional string array. I need to place all number 123's in the same array (or list), so I can pass all files with the same number over to the next function as a whole.

How do I create a "bin" with a "label" so I know if the name goes in that bin or if the bin even exist yet? Like file "123A", do I have a "bin" for 123? No, so make a bin, and add 123A to the bin. Now number "123B". Do I have a "bin" 123? yes, add "123B" to that bin. Next number "124A". Do I have a bin "124"? No, make bin, add number to bin.

I was thinking about making a bin object, but how do I efficiently see if my list of bins has a "123" without polling each bin and asking "are you bin "123"?