--MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 10 Dec 2002 at 14:26:25 -0500, Charles E. Campbell wrote: > On Tue, Dec 10, 2002 at 08:06:40AM -0500, Steve Hall wrote: >> Srinath Avadhanula wrote: >> > echo substitute(str, "\\(.\\{8}\\)[^\n]*\n", '\=3Dsubmatch(1)."\n"', = 'g') >>=20 >> Thanks, all work for me! (I am now 100% convinced the only difficult >> part of regexps is the escaping part... to quote or to double-quote, >> that is the question.) > --------------------------------------------------------------------- >=20 > IMHO its best to avoid the question -- use single quotes instead of > double-quotes. >=20 > echo substitute(str, '\(.\{8}\)[^\n]*\n', '\=3Dsubmatch(1).'\n'', 'g') =2E..which doesn't work in this case, unfortunately, as substitute() needs literal newlines in this case. Not sure if it's a bug or not, though. --=20 Piet Delport Today's subliminal thought is: --MGYHOYXEY6WxJCY8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE99137HAvFIVi81KURAjZCAJsExrZZQemYxtIztmWv96aoR3NjcgCgy5ge n1KJRpP3sKal+g48UWW21xs= =gcJ7 -----END PGP SIGNATURE----- --MGYHOYXEY6WxJCY8--