Hi list, hi RexExp experts, > I really like the boxquotes[tm] of KorrNews and I was wondering if it > is possible to implement such a feature in TB! using QTs and Macros.
[...] Thank you for the positive feedback! I simplified the QTs a little and added some REMs. Now it is easier to read the QTs and modify them for your special purposes. But I also have some questions. Maybe you guys can help me ;-) What is the maximum size of an string to store in the %COMMENT macro? I experienced that 200 lines are processed in about 1 sec. on my P3-700 notebook. But including a boxquote from a file with 2887 lines and 43305 characters lead to an CPU usage of 99% for 3-4 minutes until I killed TB! via Task Manager :-( You should not process such large files, but why should you? Is there a maximum number of recursive QTs calls allowed? Here are the modified QTs. Use them like I described in my first Mail. Enjoy... --==[ QT: bq ]----====----====----====----====----====----====----====-- ,----- [ ] %REM=_Copy clipboard into comment_%- %COMMENT='%clipboard'%- %- %REM=_Does comment end with line break?_%- %REM=_If no: add line break_%- %IF:"%- %- %SETPATTREGEXP='(?is).*[\n]\z'%- %REGEXPMATCH='%COMMENT'"=""%- :%- "%COMMENT='%COMMENT '"%- %- %REM=_Call the bq2 template_%- %QINCLUDE="bq2"%- '----- --====----====----====----====----====----====----====----====----====-- =-=-[ QT: bqf ]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ,----- [ %clipboard ] %REM=_Insert file (name in clipboard) into _%- %REM=_comment._%- %REM=_Call QT_%- %- %COMMENT='%put="%clipboard" '%- %QINCLUDE="bq2"%- '----- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --==[ QT: nq ]----====----====----====----====----====----====----====-- %REM=_Cut out part before '^-- $'_%- %REM=_and insert it into comment_%- %REM=_Call QT_%- %- %COMMENT="%- %SETPATTREGEXP='(?ism)[\n]*(.*?)[\n]*((-- [\n])|\z)'%- %REGEXPBLINDMATCH='%text'%- %SUBPATT='1'"%- %QINCLUDE="bq2" --====----====----====----====----====----====----====----====----====-- =-=-[ QT: bq2 ]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- %REM=_Does comment have two or more lines?_%- %REM=_If yes: print | and the first line_%- %REM=_ cut this line out of comment_%- %REM=_ and call this QT again_%- %REM=_If no: print | and the last line and exit_%- %- %IF:"%- %- %SETPATTREGEXP='(?is).*?[\n](.*)'%- %REGEXPMATCH='%COMMENT'x"<>"x"%- :"%- %SETPATTREGEXP='(?is)(.*?)[\n]'%- | %REGEXPMATCH='%COMMENT' %- %COMMENT='%- %SETPATTREGEXP=""(?is).*?[\n](.*)""%- %REGEXPMATCH=_%COMMENT_'%- %QINCLUDE='bq2'"%- :%- "| %COMMENT%COMMENT=''"%- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Please report bugs to me or the list. Thanks. -- Best regards, Carsten The Bat! (v1.54/10e) Business Windows NT 5.0 (Build 2195) Service Pack 2 -- ______________________________________________________ Archives : http://tbtech.thebat.dutaint.com Moderators : mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED]