Either I do something wrong or there is a regexp bug in sed !!

Giorgos Keramidas keramida at freebsd.org
Sun Nov 14 17:41:30 PST 2004


On 2004-11-14 16:05, Zoltan Frombach <tssajo at hotmail.com> wrote:
> You are right. My mistake. This indeed works:
>
> sed -E -e "s/^[0-9]+/199/" conf-split > conf-split.new

FYI,
the -e option is not necessary when -E is present:

$ echo '123foo' | sed -E 's/^[0-9]+//'
foo
$



More information about the freebsd-current mailing list