import re


def remove_non_ascii(s):
    """
    Replace consecutive non-ASCII characters with a space:

    Examples:
    >>> re.sub(rb'[^\x00-\x7f]',rb' ',b)
    b'ABC      def'
    """
    return re.sub(r'[^\x00-\x7F]+',' ', s)