next if $string !~ /(\w|\.+\.zip)<\/b>/; &do_something_with($1); #### next if $string !~ /\w|\.+\.zip<\/b>/; &do_something_with($1);