for (temp.currentArray: array){ if (temp.currentArray.pos("foo") >= 0) { echo(temp.currentArray.substring("foo".length())); }}