from typing import Optional
import re


def isolate_pflag_in_release(release: str) -> Optional[str]:
    """
    Given a release field, determines whether is contains
    .p0/.p1 information. If it does, it returns the value
    'p0' or 'p1'. If it is not found, None is returned.
    """
    match = re.match(r'.*\.(p[?01])(?:\.+|$)', release)

    if match:
        return match.group(1)

    return None