Returns the symbol formated to be searched by regular expression.

        :param symbol: The symbol.
        :type symbol: str
        :return: The symbol formated.
        :rtype: str

def _get_formated_symbol(self, symbol):
        """
        Returns the symbol formated to be searched by regular expression.

        :param symbol: The symbol.
        :type symbol: str
        :return: The symbol formated.
        :rtype: str
        """
        # pylint: disable=no-self-use

        old_symbols = [
            '\\',
            '.',
            '+',
            '*',
            '?',
            '^',
            '$',
            '[',
            ']',
            '{',
            '}',
            '(',
            ')',
            '|',
            '/',
            ',',
            '!',
            '=',
            ':',
            '-'
        ]
        replace_dict = {
            '\\': '\\\\',
            '.': r'\.',
            '+': r'\+',
            '*': r'\*',
            '?': r'\?',
            '^': r'\^',
            '$': r'\$',
            '[': r'\[',
            ']': r'\]',
            '{': r'\{',
            '}': r'\}',
            '(': r'\(',
            ')': r'\)',
            '|': r'\|',
            '/': r'\/',
            ',': r'\,',
            '!': r'\!',
            '=': r'\=',
            ':': r'\:',
            '-': r'\-'
        }
        for old in old_symbols:
            symbol = symbol.replace(old, replace_dict[old])
        return symbol