function spacify(regexp) {
const { source, flags } = regexp;
return new RegExp( source.replace(/\s+([*+{?])?/g, (_, mod) => `\\s${mod ?? '+'}`), flags )
}
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: true
dhcp4-overrides:
route-metric: 100
eth1:
dhcp4: true
dhcp4-overrides:
route-metric: 80
use-routes: false
routes:
- to: 192.168.0.0/16
via: 192.168.25.1