Q:

How replace numbers in a specific line

I need to replace numbers only in a specific line in a multiple files with sed (or awk).
The numbers in the third line must be replaced with {{ serial }}
Example for a dns file under /etc/bind/master:
$TTL    86400
@       IN      SOA     test.ex.it. host.test.it. (
                    2016060600         ; Serial
                         10800         ; Refresh
                          3600         ; Retry

Must Become:
$TTL    86400
@       IN      SOA     test.ex.it. host.test.it. (
                    {{ serial }}       ; Serial
                         10800         ; Refresh
                          3600         ; Retry

I tried with sed sed 

('s/[0-9]/{{ serial }}/g')

but couldn't get the numbers only in the third line.
How can i do that with "sed" or "awk" from the unix command line?
Thank you

A:

sed -E '3s,[0-9]+,{{ serial }},g' file

Output : 
$TTL    86400
@       IN      SOA     test.ex.it. host.test.it. (
                    {{ serial }}         ; Serial
                         10800         ; Refresh
                          3600         ; Retry

To replace file : 
sed -iE '3s,[0-9]+,{{ serial }},g' file

MacOS
sed -i '' E '3s,[0-9]+,{{ serial }},g' file

