Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py

branch
Py2 comp.
changeset 2791
a9577f248f04
parent 2525
8b507a9a2d40
parent 2733
0c4c648a93b3
child 2847
1843ef6e2656
equal deleted inserted replaced
2790:6686a3326df8 2791:a9577f248f04
299 regexp += "{0}-{1}".format( 299 regexp += "{0}-{1}".format(
300 self.__formatCharacter(index, char1), 300 self.__formatCharacter(index, char1),
301 self.__formatCharacter(index, char2)) 301 self.__formatCharacter(index, char2))
302 302
303 if regexp: 303 if regexp:
304 if len(regexp) == 2 and regexp in self.predefinedClasses: 304 if (len(regexp) == 2 and \
305 (regexp in self.predefinedClasses or regexp in self.specialChars)) or \
306 len(regexp) == 1:
305 return regexp 307 return regexp
306 else: 308 else:
307 return "[{0}]".format(regexp) 309 return "[{0}]".format(regexp)
308 else: 310 else:
309 return "" 311 return ""

eric ide

mercurial