<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _update_expression(self):
        '''Update internal expression.'''
        self._expression = re.compile(
            '^{0}(?P<index>(?P<padding>0*)\d+?){1}$'
            .format(re.escape(self.head), re.escape(self.tail))
        )