<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_pe_name(self, nlog, root):
 """additional name cleaning for paired end data"""

        use_output_name = getattr(config, 'flash', {}).get('use_output_name', False)
        if use_output_name:
            name = re.search(r'Output files\:\n\[FLASH\]\s+(.+?)\n', nlog)
        else:
            name = re.search(r'Input files\:\n\[FLASH\]\s+(.+?)\n', nlog)
        if not name:
            return None
        name = name.group(1)
        name = self.clean_s_name(name, root)
        return name