net.unix

Eric Berge berge at stolaf.UUCP
Sat Oct 6 10:06:20 AEST 1984


{}

	I was wondering if this is a chronic problem with sed.  It
seems that I cannot get sed to match patterns with an imbedded newline.
I have talked to some other avid users of sed and they seem to have
the same problem.  According to the documentation, the sequence '\n'
will match a newline imbedded in a string.  So this is what I tried:

	I wanted to match:

		.ul
		followed by anything on the next line

	and convert it to

		\fIfollowed by anything on the next line\fR

	so I tried:

		sed 's/^\.ul\n\(.*\)$/\\fI\1\\fR/'

	I even tried simple examples to try to get it to work, but to
no avail.  Can anyone help me out?

-- 

	"That which does not kill, can only make us stronger."

					-- Nietzsche

	Eric Berge

	...{ihnp4|decvax}!stolaf!berge



More information about the Comp.unix mailing list