If you really want to go without SOSEX, then try
.foreach (string {!dumpheap -short -type System.String}) { .foreach (search {s -u ${string}+c ${string}+c+2*poi(${string}+8) "mySearchTerm"}) { du /c80 ${string}+c }}
It uses
- !dumpheap to get all Strings on .NET heap
- .foreach to iterate over them
- s to search for a substring
- .foreach again to find out if s found something
- some offset calculations to get the first character (+c) of the string and the string length (+8) (multiplied by 2 to get bytes instead of characters). Those need to be adapted in case of 64 bit applications
The /c80 is just for nicer output. You could also use !do ${string}
instead of du /c80 ${string}+c
if you like the .NET details of the String.