import re


def replace_punctuation_and_whitespace(text):
    """Replace occurrences of punctuation (other than . - _) and any consecutive white space with ."""
    rx = re.compile(r"[^\w\s\-.]|\s+")
    return rx.sub(".", text)