import re


def _regexp(pattern, string):
    """Simple custom regex search function

    SQLite does not come with a predefined regular expression function.
    We define our own in order to access Python's powerful regex module.

    Parameters
    ----------
    pattern : str
        Regular expression to match against
    string : str
        String in which to find `pattern`

    Returns
    -------
    match : bool
    """
    if string is not None:
        reg = re.compile(pattern)
        return reg.search(string) is not None
    else:
        return False