Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3058
0a02c433f52d
parent 3034
7ce719013078
child 3145
a9de05d4a22f
equal deleted inserted replaced
3058:0a02c433f52d 3060:5883ce99ee12
656 regexp += "{0}-{1}".format( 656 regexp += "{0}-{1}".format(
657 self.__formatCharacter(char1, format), 657 self.__formatCharacter(char1, format),
658 self.__formatCharacter(char2, format)) 658 self.__formatCharacter(char2, format))
659 659
660 if regexp: 660 if regexp:
661 if (regexp.startswith("\\") and \ 661 if (regexp.startswith("\\") and
662 regexp.count("\\") == 1 and \ 662 regexp.count("\\") == 1 and
663 "-" not in regexp) or \ 663 "-" not in regexp) or \
664 len(regexp) == 1: 664 len(regexp) == 1:
665 return regexp 665 return regexp
666 else: 666 else:
667 return "[{0}]".format(regexp) 667 return "[{0}]".format(regexp)

eric ide

mercurial