I missed the fact that Posix and Linux ed support s/foo/bar/3 (as opposed to s3/foo/bar); ex does not, unfortunately. We need a Great Unification of Line Editors.