Just remove the last criterion:

=SUBSTITUTE(A1;" ";"-")

Regards