# R, 72 bytes f=function(x)while(tryCatch(!nchar(x)|x,error = function(e)1))grep(x,'')