import re
import uuid


def _renewUUIDs(jsonString):
    """Renew uuids in given text, by doing complete string replacements
    with newly generated uuids.

    Return the resulting text.
    """
    RE_UUID = r"(?P<uuid>\w{8}-\w{4}-\w{4}-\w{4}-\w{12})"
    matches = re.findall(RE_UUID, jsonString)
    uuids = list(set(matches))
    for original in uuids:
        replacement = str(uuid.uuid4())
        jsonString = jsonString.replace(original, replacement)
    return jsonString