Very simple mockup, and not sure of best way to implement/word it, but when “Use Output Bar” is enabled, all matches appear in Output Bar. If Incremental Search is enabled, then the Output Bar is updated with matches as the user changes the Find/Replace expression. If Incremental Search is disabled, then matches only appear in Output Bar if Find/Replace All is clicked. If “Search All Open Documents” is enabled, then all matches from all documents appear in the Output Bar, with an optional header before each documents’ matches indicating the document name – eg.
When Replace is used, it’s the replaced expression that should appear in the Output Bar (see CrashNBurn suggestion below for more options), as this allows you to use regular expressions to find matching text, and then use back references to modify the matches that appear in the Output Bar.
NOTE: For Replace dialog, you also need to add “Count Matches” checkbox, along with the “Use Output Bar” checkbox to the dialog.
It would be useful if a gutter could be enabled in the Output Bar showing line numbers, similar to how it works in the normal editor area (I say gutter, as these numbers should not be included if text is selected in the Output Bar).
You could also add a new button to the Find/Replace dialog, “Extract to new document”, which when clicked would create a new document with the contents of the Output Bar.
The above should also be done for the Find/Replace Bar, so the extract option can be accessed without needing to open the Find/Replace dialog.
The above would be great for starters as it would allow text extraction from a single document using regex, with incremental feedback on what is matched.
As CrashNBurn suggested, for Replace, it would be useful it the user could choose what the Output Bar showed:
– All found text
– All replaced text (this should be the default IMO)
– Both found and replaced text (have found text and matching replaced text on each line, with a tab or few spaces in between.)