<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_pattern(self, field_name):
 """ Get a regular expression to match a formatting directive that references the given field name. :param field_name: The name of the field to match (a string). :returns: A compiled regular expression object. """

        return re.compile(self.raw_pattern.replace(r'\w+', field_name), re.VERBOSE)