Im having difficulty with something that is probably simple. Essentially i want to return any instances of a character inside an array, my example here should provide more clarity then this explanation. One thing to note is that ill be doing this in a loop and the index wont be the same nor will the letter in question, therefore as far as im aware i cant .indexof or substring;
$array = "asdfsdgfdshghfdsf"
$array -match "d"
returns: True
What i would like it to return: ddd
Abit like grep in bash