Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py

changeset 2733
0c4c648a93b3
parent 2302
f29e9405c851
child 2791
a9577f248f04
child 2824
858412c29c34
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py	Fri Jun 21 19:28:37 2013 +0200
+++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py	Sat Jun 22 15:36:46 2013 +0200
@@ -638,7 +638,10 @@
                 self.__formatCharacter(char2, format))
         
         if regexp:
-            if regexp.startswith("\\") and regexp.count("\\") == 1 and "-" not in regexp:
+            if (regexp.startswith("\\") and \
+                regexp.count("\\") == 1 and \
+                "-" not in regexp) or \
+               len(regexp) == 1:
                 return regexp
             else:
                 return "[{0}]".format(regexp)

eric ide

mercurial