Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py

changeset 96
9624a110667d
parent 45
9a18f4dbb493
child 425
ca5e65413fc5
child 792
a13346916170
equal deleted inserted replaced
95:261bc03812fd 96:9624a110667d
5 5
6 """ 6 """
7 Module implementing the Python re wizard dialog. 7 Module implementing the Python re wizard dialog.
8 """ 8 """
9 9
10 import sys
11 import os 10 import os
12 import re 11 import re
13 12
14 from PyQt4.QtCore import * 13 from PyQt4.QtCore import *
15 from PyQt4.QtGui import * 14 from PyQt4.QtGui import *
375 """ 374 """
376 regex = self.regexpTextEdit.toPlainText() 375 regex = self.regexpTextEdit.toPlainText()
377 if regex: 376 if regex:
378 try: 377 try:
379 if self.py2Button.isChecked(): 378 if self.py2Button.isChecked():
380 regobj = re.compile(regex, 379 re.compile(regex,
381 (not self.caseSensitiveCheckBox.isChecked() and re.IGNORECASE or 0) | \ 380 (not self.caseSensitiveCheckBox.isChecked() and re.IGNORECASE or 0) | \
382 self.multilineCheckBox.isChecked() and re.MULTILINE or 0 | \ 381 self.multilineCheckBox.isChecked() and re.MULTILINE or 0 | \
383 self.dotallCheckBox.isChecked() and re.DOTALL or 0 | \ 382 self.dotallCheckBox.isChecked() and re.DOTALL or 0 | \
384 self.verboseCheckBox.isChecked() and re.VERBOSE or 0 | \ 383 self.verboseCheckBox.isChecked() and re.VERBOSE or 0 | \
385 self.localeCheckBox.isChecked() and re.LOCALE or 0 | \ 384 self.localeCheckBox.isChecked() and re.LOCALE or 0 | \
386 self.unicodeCheckBox.isChecked() and re.UNICODE or 0) 385 self.unicodeCheckBox.isChecked() and re.UNICODE or 0)
387 else: 386 else:
388 regobj = re.compile(regex, 387 re.compile(regex,
389 (not self.caseSensitiveCheckBox.isChecked() and re.IGNORECASE or 0) | \ 388 (not self.caseSensitiveCheckBox.isChecked() and re.IGNORECASE or 0) | \
390 self.multilineCheckBox.isChecked() and re.MULTILINE or 0 | \ 389 self.multilineCheckBox.isChecked() and re.MULTILINE or 0 | \
391 self.dotallCheckBox.isChecked() and re.DOTALL or 0 | \ 390 self.dotallCheckBox.isChecked() and re.DOTALL or 0 | \
392 self.verboseCheckBox.isChecked() and re.VERBOSE or 0 | \ 391 self.verboseCheckBox.isChecked() and re.VERBOSE or 0 | \
393 (not self.unicodeCheckBox.isChecked() and re.UNICODE or 0)) 392 (not self.unicodeCheckBox.isChecked() and re.UNICODE or 0))

eric ide

mercurial