diff --git a/tests/data/test766 b/tests/data/test766
index c751b32571..65285c6d26 100644
--- a/tests/data/test766
+++ b/tests/data/test766
@@ -35,7 +35,7 @@ ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER
# Strip off parts of the EPRT command that might differ
# The TYPE command might get sent so we ignore that
-s/^TYPE (.*)//
+s/^TYPE (.*)$//
s/^EPRT \|1\|(.*)/EPRT \|1\|/