Select all that ends with __2 or __3

Hi, is there a script that does this?

example: select all objects that ends with __2 and __3

if not, how do i create one?

the reason for asking is i had a guy telling me to import iges cad files and every single patch or line has 2 duplicates each, i just wanna make it lighter and the assemblies contain to many separate objects to manually select them.

i have no previous experience with mel and are quite new to maya so any help would be welcome! =)

thx in advance / IOR

A couple different ways. If you're not picky about the 2 and 3, you could do this:
string $list[] = ls "*\_\_?";
However, if you are picky about the 2 & 3, then try this:
string $list[] = ls {"*\_\_2", "*\_\_3"};

and then of course:
select $list;

thanx, it worked! =) i'm soooo thrilled....just made my life a TON easier! =)