CodeGenerator 0 0 800 333 PyRex Code Generaotr :/icons/icons/icon.ico:/icons/icons/icon.ico 0 0 0 0 border-bottom: 2px; border-style: solid; border-bottom-color: rgb(255, 85, 0); 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">import re</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">regex = r&quot;&lt;CHANGE_ME&gt;pattern&lt;CHANGE_ME&gt;&quot;</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">test_str = &quot;&lt;CHANGE_ME&gt;string&lt;CHANGE_ME&gt;&quot;</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">matches = re.finditer(regex, test_str, re.MULTILINE)</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">for matchNum, match in enumerate(matches, start=1):</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> print (&quot;Match {matchNum} was found at {start}-{end}: {match}&quot;.format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> for groupNum in range(0, len(match.groups())):</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> groupNum = groupNum + 1</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> print (&quot;Group {groupNum} found at {start}-{end}: {group}&quot;.format(groupNum = groupNum, start = match.start(groupNum), end = match.end(groupNum), group = match.group(groupNum)))</span></p></body></html> Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse 0 Qt::Horizontal 40 20 QPushButton#CopyPushButton { min-width:60px; max-width:60px; min-height:35; max-height:35; color: #495057; background: rgba(255,255,255,100%); border-bottom: 2px; border-style: solid; border-bottom-color: rgba(0,0,0,.3); border-top-left-radius: 0px; border-top-right-radius: 3px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; } QPushButton#CopyPushButton:hover { background: rgba(255,255,255,50%); border-bottom-color:rgb(255, 85, 0); } QPushButton#CopyPushButton:pressed { background: rgba(255,255,255,100%); border-bottom-color:rgb(255, 85, 0); } QPushButton#CopyPushButton:disabled { background: rgba(0,0,0,.04); border-bottom-color: rgba(0,0,0,.15); } Copy QPushButton#ClosePushButton { min-width:60px; max-width:60px; min-height:35; max-height:35; color: #495057; background: rgba(255,255,255,100%); border-bottom: 2px; border-style: solid; border-bottom-color: rgba(0,0,0,.3); border-top-left-radius: 0px; border-top-right-radius: 3px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; } QPushButton#ClosePushButton:hover { background: rgba(255,255,255,50%); border-bottom-color:rgb(255, 85, 0); } QPushButton#ClosePushButton:pressed { background: rgba(255,255,255,100%); border-bottom-color:rgb(255, 85, 0); } QPushButton#ClosePushButton:disabled { background: rgba(0,0,0,.04); border-bottom-color: rgba(0,0,0,.15); } Close Qt::Horizontal 40 20 0 0 800 21 ClosePushButton clicked() CodeGenerator close() 432 560 399 299 CopyPushButton clicked() textEdit selectAll() 366 560 399 280 CopyPushButton clicked() textEdit copy() 366 560 399 280