Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py

changeset 3034
7ce719013078
parent 3025
67064c71df21
child 3060
5883ce99ee12
child 3160
209a07d7e401
equal deleted inserted replaced
3033:58fe260e7469 3034:7ce719013078
654 regexp += "{0}-{1}".format( 654 regexp += "{0}-{1}".format(
655 self.__formatCharacter(char1, format), 655 self.__formatCharacter(char1, format),
656 self.__formatCharacter(char2, format)) 656 self.__formatCharacter(char2, format))
657 657
658 if regexp: 658 if regexp:
659 if (regexp.startswith("\\") and \ 659 if (regexp.startswith("\\") and
660 regexp.count("\\") == 1 and \ 660 regexp.count("\\") == 1 and
661 "-" not in regexp) or \ 661 "-" not in regexp) or \
662 len(regexp) == 1: 662 len(regexp) == 1:
663 return regexp 663 return regexp
664 else: 664 else:
665 return "[{0}]".format(regexp) 665 return "[{0}]".format(regexp)

eric ide

mercurial