Sorry for the delayed reply.
Javascript code:
/*
Usage:
var a = FindInPsm('test');
for (var i in a)
Debug.Trace(a[i].Email);
*/
function FindInPsm(sTextToFind) {
var oContainer = [];
for (var oContact = new Enumerator(Messenger.MyContacts); !oContact.atEnd(); oContact.moveNext())
if (oContact.item().PersonalMessage.indexOf(sTextToFind) !== -1)
oContainer.push(oContact.item());
return oContainer;
}