I've imported a model from the BodyParts3D database (http://lifesciencedb.jp/bp3d/)
It's made up of a huge number of .obj files. These have a name based on the anatomical structure/organ:

My question is whether it's possible to use a Python script to go through the objects in the scene and;
- parent them together under an empty transform, according to a text string search
- add a material based on that text string
e.g. FJ2574_BP48954_FMA14964_Proximal part of ileum.obj
so any object with 'FMA14964' in its name would be parented under a transform named 'FMA14964', and be given the same material ('FMA14964_mat', or whatever).
For #2, I've found this 'How to assign a new material to an object in the scene from Python?' which I could probably work out how to tweak to do what I need, but I don't know how to iterate through the objects in the scene and do a a search based on a text string
I'm new to Python, but ok in C# and other programming languages. Fairly new to Blender (mostly I work in Unity) Any help would be very much appreciated!