def _find_variable(self, pattern, logline):
        """
        Return the variable parts of the code given a tuple of strings pattern.

        Example: (this, is, a, pattern) -> 'this is a good pattern' -> [good]
        """
        var_subs = []
        # find the beginning of the pattern
        first_index = logline.index(pattern[0])
        beg_str = logline[:first_index]
        # strip the beginning substring
        var_subs.append(self._strip_datetime(beg_str))

        for patt, patt_next in zip(pattern[:-1], pattern[1:]):
            # regular expression pattern that finds what's in the middle of
            # two substrings
            pat = re.escape(patt) + '(.*)' + re.escape(patt_next)
            # extract whats in the middle of the two substrings
            between = re.search(pat, logline)
            try:
                # add what's in between if the search isn't none
                var_subs.append(between.group(1))
            except Exception:
                pass
        rest_of_string = logline.rindex(pattern[-1]) + len(pattern[-1])

        # add the rest of the string to end minus the counters and durations
        end_str = logline[rest_of_string:]
        var_subs.append(self._strip_counters(end_str))

        # strip whitespace from each string, but keep the strings themselves
        # var_subs = [v.strip() for v in var_subs]

        return var_subs
Return the variable parts of the code given a tuple of strings pattern.

        Example: (this, is, a, pattern) -> 'this is a good pattern' -> [good]