Welcome to the IDM Forum. This forum is meant as a user-to-user support mechanism where users can share knowledge and tips for all IDM software.
Since these forums are user-to-user based, IDM does not regularly read or reply to the posts in this forum. For problem reports, suggestions, or feature requests, you must email us directly. Our trained technical support staff answers most inquiries within 30 minutes.

[images]http://...[/images]
Reply: [quotes]bla bla[/quotes]
[images]http://...[/images]
[quotes]bla bla[/quotes]



Mofi wrote:A quick manual solution is to simply search for the string of interest and check the advanced search option List Lines Containing String before executing the search. Then press button Clipboard to copy the lines of interest to the clipboard and close the dialog. Open a new file with Ctrl+N or select everything in current file with Ctrl+A and paste the clipboard content with Ctrl+V.
pietzcker wrote:A Perl regular expression (courtesy of http://www.regular-expressions.info/completelines.html) that does the job is:
^(?:(?!%REGEX%).)*$\r\n
Replace all with nothing.

InsertMode
ColumnModeOff
HexOff
SelectAll
Copy
NewFile
PreviousDocument
NextDocument
Paste
EndSelect
UnixReOff
Top
Find RegExp "%
"
Replace All ""
Bottom
Key END
IfColNum 1
Key BACKSPACE
EndIf
Bottom
IfColNumGt 1
InsertLine
IfColNumGt 1
DeleteToStartofLine
EndIf
EndIf
Top
Find RegExp "%*:*
"
Replace All ""
SelectAll
Clipboard 8
Copy
PreviousDocument
PerlReOn
Bottom
IfColNumGt 1
InsertLine
IfColNumGt 1
DeleteToStartofLine
EndIf
EndIf
Top
Find RegExp "^(?:(?!:).)*$\r\n"
Replace All ""
NextDocument
CloseFile NoSaveInsertMode
ColumnModeOff
HexOff
UnixReOff
Top
Find RegExp "%
"
Replace All ""
Bottom
Key END
IfColNum 1
Key BACKSPACE
EndIf
Bottom
IfColNumGt 1
InsertLine
IfColNumGt 1
DeleteToStartofLine
EndIf
EndIf
Top
ColumnModeOn
ColumnInsert "½"
ColumnModeOff
Find RegExp "½^(*^):"
Replace All "^1:"
TrimTrailingSpaces
Top
Clipboard 9
ClearClipboard
Loop
Find RegExp "%½*^p"
IfFound
SelectLine
CutAppend
Else
ExitLoop
EndIf
EndLoop
NewFile
PreviousDocument
NextDocument
Paste
Top
Find "½"
Replace All ""
SelectAll
Cut
CloseFile NoSave
Else
Bottom
NextDocument
CloseFile NoSave
EndIf
Top
Clipboard 8
ClearClipboard
Loop
Find RegExp "%½*^p"
IfFound
SelectLine
CutAppend
Else
ExitLoop
EndIf
EndLoop
NewFile
PreviousDocument
NextDocument
Clipboard 8
Paste
Top
"
"
Top
Clipboard 9
Paste
Top
Find "½"
Replace All ""
SelectAll
Cut
CloseFile NoSaveM@Cr0MaN wrote:I tried that with the Perl Expression and got a bunch of errors and it was still trying to find lines without colons.
M@Cr0MaN wrote:After running pietzckers' Perl macro, a lot of the macro's I've made would not work anymore.
// Activate UnixReOn or PerlReOn (v12+ of UE) here at the end of the macro
// if you do not use UltraEdit style regular expressions by default - see
// search configuration. Macro command UnixReOff sets the regular expression
// option to UltraEdit style.
// UnixReOn
// PerlReOnM@Cr0MaN wrote:I also noticed you had a 0 after the word Loop. Why did you do that?
M@Cr0MaN wrote:I also noticed you added ColumnModeOn over ColumnInsert

Mofi wrote:You have obviously replace both colons in the Perl regular expression string by @ instead of just the second formatted bold red in my previous post.
Mofi wrote:Find RegExp "^(?:(?![@).)*$\r\n"
Mofi wrote:That's the reason why all my macros in Mofis_Macro_Examples.uem contain at end (or above ExitMacro command) the comment lines...
Mofi wrote:From help of UltraEdit about macro command Loop: A value of 0 indicates Loop forever...
Mofi wrote:As you can see in the Column menu the menu item Insert/Fill Columns is disabled if Column Mode is not active ...
Mofi wrote:EndSelect after pasting something into a new file is unnecessary...