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_at_freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe_at_freebsd.org"Received on Mon Nov 15 2004 - 00:46:31 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:22 UTC