Find public assigned values using editor script

I am trying to find out if certain scripts have a material assigned, and if they do if those scripts are used in a scene. If those scripts are used in a scene I would like to find out if they have material publicly assigned .

Is it possible to obtain the publicly assigned materials through editor script? Right now I am using the following script to determine if it contains a material, and if a scene depends on it. But I am not sure on how to approach the read out of public variables over several scenes.

//finds all monobehaviour scripts (c# java boo)
foreach (MonoScript m in GetScriptAssetsOfType<MonoBehaviour>())
    {
        //regex for c# array/list/variable
        bool containsmaterial = Regex.IsMatch(m.text, @"\bMaterial\b");
        bool containsmateriallist = Regex.IsMatch(m.text, @"\bList<Material>\b");
        bool containsmaterialarray = Regex.IsMatch(m.text, @"\bMaterial[]\b");

        if (containsmaterial || containsmaterialarray || containsmateriallist)
        {
            Object currentObject = m as Object;
            //check if it has dependencies
            List<Object> results = S_collectDependencies(currentObject);

            if (results.Count >= 1)
            {
                string currentName = currentObject.name;

                foreach (Object o in results)
                {   
                    //if one of the dependencies is a scene
                    if (o.name.EndsWith(".unity"))
                    {
                        //find the public variables for M here 
                    }
                    else
                        continue;
                }

            }
            else
                continue;
        }

Could you not just select all objects in the scene and iterate through them and their children to check their materials?
"
Selection.gameObjects
static GameObject gameObjects;
Description

Returns the actual game object selection. Includes prefabs, non-modifyable objects.

When working with objects that are primarily in a scene, it is strongly recommended to use Selection.transforms instead.
"
Then you could create an list that adds the game objects that contain the material you are looking for and selects it after.