https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93965
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Dunno, but wouldn't it be better to require either no -s or both, but not just one? So sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)\([-]*\)\([01][0-9]\)\2\([0-3][0-9]\).*$,\1\3\4,p' ?