This code snippet searches for the given text ( @newString) and retruns functions, CHECK/DEFAULT constraints, triggers, views and STORED PROCEDUREs.
So if we needed to search for only stored procedures TEXT, then there should be an extra condition
select name from sysobjects where id in
(select id from syscomments where text like @newString )
order by name;