def __init__(self, s):
self.txt = s<EOL>self._family = self._extract_family(s)<EOL>self.regex = re.compile(s)<EOL>
Create a regex rule.

        Args:
            s (str): Regex pattern. Eg '.*\\.beta$'.