No, there isn't any logic behind it. It's because I'm working with other third parties, and they may have all sorts of different naming system. Just to give a background, I work where third parties extract families from Revit and export them into AutoCAD as blocks. As an example, one of my jobs is to have a certain block (of my own) placed on the insertion point of many other blocks (with the similar names). It makes the whole process easier if I can just ssget based on their names if they are exactly the same blocks, but as you move on from project to project, it's just impossible to find a fixed naming system, but surprisingly their names are always very similar regardless.
So my idea was to create a command where I prompt the user to select any two of the desired blocks first, get this string matching pattern, and then integrate this in ssget or wcmatch filtering operations to be able to select the entire drawing. It may not get 100% of it, but at least it can cut the work by getting 85% done.
Thanks a lot Marko! It works great. I'll have to study this.