588 regexp += "{0}-{1}".format( |
588 regexp += "{0}-{1}".format( |
589 self.__formatCharacter(char1, format), |
589 self.__formatCharacter(char1, format), |
590 self.__formatCharacter(char2, format)) |
590 self.__formatCharacter(char2, format)) |
591 |
591 |
592 if regexp: |
592 if regexp: |
593 if (regexp.startswith("\\") and \ |
593 if (regexp.startswith("\\") and |
594 regexp.count("\\") == 1 and \ |
594 regexp.count("\\") == 1 and |
595 "-" not in regexp) or \ |
595 "-" not in regexp) or \ |
596 len(regexp) == 1: |
596 len(regexp) == 1: |
597 return regexp |
597 return regexp |
598 else: |
598 else: |
599 return "[{0}]".format(regexp) |
599 return "[{0}]".format(regexp) |