in reply to regex help needed

It looks like you want something like:

if ($string =~ /(?<!echo )Done$/i) { # update to look-behind instead o +f look-ahead print "match found\n"; }

Replies are listed 'Best First'.
Re^2: regex help needed
by Anonymous Monk on Jul 17, 2009 at 16:47 UTC
    Thats better but DONE isn't always the last item in the string.
Re^2: regex help needed
by JavaFan (Canon) on Jul 17, 2009 at 16:51 UTC
    That's not any different from /Done$/. (Originally jwkrahn had /(?!echo )done$/ - but he updated it after I posted my reply)