Hi all:
Mark Olson solved the problem for me. The solution is to use /usr/xpg4/bin/vi
instead of other versions of vi. It also solved the problem I would have
encountered with sed, as other versions of sed rejected the reg exp I had.
Sanjiv
--Thanks to:
"Robert L. Harris" <Robert.Harris@commerce.com> Mark Olson <mark_olson@adc.com> John Bonura <johnb@univ-wea.com> Tim Carlson <tim@santafe.edu>
Original question:
Hi all:
I want to replace multiple occurrences of a regular expression by a single one. For example, the following line
catcatcatcatcatcatdogcatcatcatcatcatcat
is to be replaced as
mousedogmouse
I have tried
:s/\(cat\)\{1,\}/mouse/g
but it does not help. I tried the exact same command on SGI IRIX 6.2 and it worked, but failed on IRIX 5.3.
I am using Solaris 2.7 on an ultra 10, and tried it on SunOS 4.1.3 as well, but without success. Please help.
Thanks.
Sanjiv -- Sanjiv K. Bhatia Department of Math & Computer Science sanjiv@aryabhat.umsl.edu University of Missouri -- St. Louis voice: (314)-516-6520 St. Louis, MO 63121-4499 fax : (314)-516-5400 http://www.cs.umsl.edu/Faculty/sanjiv.html
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:25 CDT