<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def match_replace_regex(regex, src_namespace, dest_namespace):
 """Return the new mapped namespace if the src_namespace matches the regex."""

    match = regex.match(src_namespace)
    if match:
        return dest_namespace.replace("*", match.group(1))
    return None