Date: Sun, 14 Nov 2004 18:10:40 -0800 From: "Zoltan Frombach" <tssajo@hotmail.com> To: "Maxime Henrion" <mux@freebsd.org> Cc: freebsd-stable@freebsd.org Subject: Re: Either I do something wrong or there is a regexp bug in sed !! Message-ID: <BAY2-DAV16wRPQIWDO30001f1cc@hotmail.com> References: <BAY2-DAV16kTgbLYluL0001ec55@hotmail.com> <1100476106.10768.4.camel@rushlight.kf8nh.com> <BAY2-DAV8cm9t0CI76r0001ef19@hotmail.com> <20041115014221.GF32839@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks. I will not use the -E flag then. Zoltan > Zoltan Frombach wrote: >> You are right. My mistake. This indeed works: >> >> sed -E -e "s/^[0-9]+/199/" conf-split > conf-split.new >> >> Thanks for clearing this up. > > For what it's worth, there is another way to write this regexp without > using the -E flag. Since x+ == xx*, you can write it: > "s/^[0-9][0-9]*/199/". The reason for not using -E is that it's not > portable, since it's not specified by the standard. GNU sed uses -r for > extended REs. > > Cheers, > Maxime _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY2-DAV16wRPQIWDO30001f1cc>