Searching for the Pokémon to transfer in Pokémon GO can be tedious and a pain in the a**. I know this because even though I have over 3000 storage space, I still need to clear the space for events like Community Day, GO Fest, etc.
To clear my Pokémon storage and mass transfer over 500+ Pokémon at once, I use 0*,1*,2*&age0 then the ‘select all’ option. After which I use 0*,1*,2*&age0&0attack so I can uncheck the ones with 0 attack. I also use 0*,1*,2*&age0&shadow so I can uncheck shadows.
I then transfer the remaining. I check the ones left for good PVP IVs and shadows I can purify with 1000 Stardust. I then transfer the remaining.
Currently, you cannot mass transfer shiny Pokémon. So, using the above search strings will not transfer the shinies. You will have to select each and transfer.
To do this, after performing the earlier process, I use 0*,1*,2*&age0&shiny to get the list of the shiny Pokémon that can be transferred individually.