Check if sed accepts the -r flag, otherwise try -E