Re^2: Regular Expression delimiters

Jerry Peek jdpeek at RODAN.ACS.SYR.EDU
Tue Apr 18 10:31:59 AEST 1989


In article <2286 at fireball.cs.vu.nl> maart at cs.vu.nl (Maarten Litmaath) writes:
> chris at mimsy.UUCP (Chris Torek) writes:
> \(I also prefer a comma as the separator: sed 's,/,\\/,g'.)
> 
> I use minus: sed 's-/-\\/-g'

In cases like this, I use control characters (usually ^A or ^G).
I try to put a comment line above -- so people will notice:

	# THE NEXT LINE USES CONTROL-A CHARACTERS AS THE sed SEPARATOR:
	sed "s^A${foo}^A${bar}^Ag"

--Jerry Peek; Syracuse University Academic Computing Services; Syracuse, NY
  jdpeek at rodan.acs.syr.edu, SUNRIS::JDPEEK, jdpeek at suvm.bitnet
  +1 315 443-3995



More information about the Comp.unix.questions mailing list