Bulk change type of product to goods-> services depending on code

Is there a trytonick acceptable way of easily changing the type of a product depending on its code.
for instance all code like P% (pdf) should be in service ( no strok move, no needs to count…)