EDIT:
My original answer was assuming that "some string" means "any string". If you need to look for a specific one, Perl is probably your best option, since almost nothing can beat Perl when it comes to REGEX matching.
However, if you can't use Perl for any reason (you can expect Perl to be present in most Linux distros, but nobody forces a user to install it, though Perl may not be available), you can do it with the help of grep. However, some of the grep solutions I have seen so far are suboptimal (they are slower than would be necessary). In that case I would rather do the following:
MATCH=''; while [[ "e$MATCH" == "e" ]]; do MATCH=`COMMAND | grep "SOME_STRING"`; done; echo $MATCH
Replace COMMAND with the actually command to run and *SOME_STRING* with the string to search. If SOME_STRING is found in the output of COMMAND, the loop will stop and print the output where SOME_STRING was found.
ORIGINAL ANSWER:
Probably not the best solution (I'm no good bash programmer), but it will work :-P
RUN=''; while [[ "e$RUN" == "e" ]]; do RUN=`XXXX`; done ; echo $RUN
Just replace XXXX with your command call, e.g. try using "echo" and it will never return (as echo never prints anything to stdout), however if you use "echo test" it will terminate at once and finally print out test.