import re


def _findFirst( pattern, src ):
    """
    A helper function that simplifies the logic of using regex to find
    the first match in a string.
    """
    
    results = re.findall( pattern, src )
    if len(results) > 0:
        return results[0]
    return None