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
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to