loop through matierals and look for name containing a word

Hi im looking to loop through this is code to find the arm and head shader and then use them to change the material of them i want to do this by looking for the keywords “head” and “arms” how do i go about doing this?

Something like:

if(material.name.Contains("head"))