import re


def regexmatch(s, pat):
    """Search `title` and `desc` fields

      Args:
          s   : `title` | `desc` field
          pat : search-query

    Removes whitespace and special characters in
    both `s` and `pat` before matching regular
    expressions.

      Returns:
          `bool` --> True/False
    """
    m = False
    special_chars = "[^a-zA-Z0-9\.]"
    if isinstance(s, str) == True:
        pat = re.sub(special_chars, "", pat)
        s = re.sub(special_chars, "", s)
        if re.search(pat, s, flags=re.I):
            m = True
    return m