Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
  • #11002

    Yutaka Emura

    Deipotent wrote:

    Yutaka wrote:

    Deipotent wrote:
    Glad to see a new version of EmEditor with some useful new features. Bit disappointed though that my suggestion for text extraction has still not made it in though, particularly given that EmEditor already has a lot of the functionality needed to implement this feature:

    I am not exactly sure what you would like to see in future versions. If you want to extract searched lines, you can “bookmark” searched lines (by pressing the “Bookmark All” button in the Find dialog), and then use the “Extract Bookmarked Lines to New File” command. You can also write a macro to automate this process.


    I only want to extract text that matches the find expression, and not the whole line where the match occurs. The link I gave to the original suggestion topic explains in detail what I’m after, but a very simple example would be – Suppose I have the following lines:


    If I do a simple match (ie. not regular expression) of “bcd”, all occurrences of “bcd” would be highlighted in EmEditor (as is currently the case when incremental search is enabled), and the output bar would have the following (as the first 3 lines contain this search expression):


    Each match goes on a separate line. This would allow text to be extracted that matches a search expression. This is only a really simple example – see the linked topic for more detail.

    It should update the output bar in real-time with the matches (ie. as the find expression is being modified), if incremental searching is enabled. It should obviously support regular expressions, with back-references.

    EmEditor already has most of the funxctionality in-place to make implementing this feature relatively straight-forward:

    – Regular expression support for Find/Replace
    – Incremental search with all occurrences being highlighted

    1) As CrashNBurn mentioned in the other topic, Find and Replace dialogs should allow output to Output bar

    There are various other related features/options regarding this suggestion (eg. extract to a new document) that are mentioned in the other topic, so please read the other topic for more info.

    With this functionality, EmEditor can be used as a text-extraction/mining tool, with real-time feedback on what is being matched (which helps with constructing the correct regex).

    Let me know if there is anything that is not clear and I’ll do my best to explain it further.

    Sometimes a simple image or screenshot can explain better than many words. Can you show an image including a new check box exactly how you want it to be called, and include sample text before and after you set this check box?



    Yutaka Emura

    zhouzh2 wrote:
    Beta 5 still has this issue. doesn’t know if this is by design…
    how to reproduce:
    1. Do a vertical selection.
    2. SHIFT+ARROWSHIFT+F8 work as they should.
    3. type something. the selection is then be replaced with the text you input. this is fine.
    4. SHIFT+ARROW has no effect afterwards. the cursor moves, but selection doesn’t, and text will only append to the last portion of the selection, no mater where your cursor is.
    5. SHIFT+F8 changes the cursor from downright corner to upperleft corner, which is correct.
    But SHIFT+F8 again changes the cursor from upperleft to downleft, instead of returning to downright.
    this is also true with multiple selection.

    I reproduced this issue. When a box selection converts to multiple selections (3. by typing something), SHIFT + ARROW no more works. On Beta 6, I will clarify the behavior by clearing all the selections in this case.




    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.

    –> Untitled*

    –> MyDoc1.txt

    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.)



    The other suggestions from that thread related to Find In Files:

    1) Option to leave Find/Replace in Files dialog open after pressing Find button (much like the new “Close when finished” checkbox on Find/Replace dialog).

    2) Ability to exclude file name from search results (ie. the opposite of the “Display File Names Only” option). To achieve this, you could rename “Display File Names Only” to “Display File Names”, and add another checkbox option, “Display Matched Lines”. The file names checkbox would control whether the filename was inserted before the matched text/line. The matched lines checkbox would control whether the entire line where the match occurs is displayed, or only the matched text is displayed.

    This would allow text extraction from files. :)

    3) “Incremental Search Against Current Document” option on Find/Replace In Files. When enabled, it will perform incremental searching/highlighting against the currently active document. This would aid creation of Find Expression, since you can see what is being matched as you create the find expression, without the need to switch to normal Find/Replace windows. This would not cause the matches to appear in the Output Bar.

    This would make it easier to construct the regex find expression, before actually performing the find/replace in files.

    4) Related to (2), have an “Incremental Search” option for Find/Replace In Files (like normal Find/Replace option), which would actually do incremental matching against files. With this option enabled, matches would appear in the Output Bar as the find/replace expression is being modified.



    Hi Yutaka,

    I didn’t hear back to you about my suugestion above, and that you understand what I’m asking for ?

    Can you please implement this feature in EmEditor (if not for v13, then hopefully in a 13.x update) ?


    Yutaka Emura

    Hello Deipotent,

    I am sincerely sorry for my late responses. The v13 feature set has been fixed already, and I am not going to add or change any more resources because we are already asking translators to translate the resources.

    For future versions, it is possible to add your feature. However, I am afraid that I am not generally good at understanding English. Your feature seems so complicated that I had a hard time figuring out why this feature is so important. Can you please explain (with simple words) what is a good example when this feature becomes useful? The screenshot ( doesn’t explain why the feature is important. Please write as simple as possible.

    Also, can you try the new multiple-selection editing feature of v13? With this new feature, you can easily select multiple selections using CTRL + SHIFT + A, and then you can replace the strings just by typing. In my opinion, the multiple-selection editing is much more easy to use.

    Thank you,



    The feature is important because it allows EmEditor to be used for text extraction/data mining. Sure, EmEditor allows you to extract the entire lines where matches occur, but not just the matches themselves.

    For example, suppose you have a document containing a load of URL’s interspersed with other text/HTML. The URL’s are in the format, but you actually need them in the format (ie. the folder components have been swapped). With the functionality I’m requesting, it would be easy to write a find and replacement expression, and then extract just the URL’s in the required format.

    The real-time/incremental update of the Output Bar with the results helps when writing the find/replace expressions as you can get a visual indication of what is being matched, and what will be extracted/shown in the Output Bar.

    EmEditor already has most of the functionality built-in (ie. regex, incremental matching etc.), it just needs to be hooked up so that the matches appear in real-time in the Output bar.

    Let me know if you need me to explain further.


    Yutaka Emura

    Hello Deipotent,

    Thank you for explaining. For this purpose, I believe the multiple-selection editing would be easy to use. When you place the cursor at a string (in this case,, you will see how many strings are matched on the status bar. And then you can press BACKSPACE 7 times to delete the last 7 seven characters, and type “321/123” to change the strings.

    Thank you!



    I think you still mis-understand me slightly. Although I gave the example URL as , the “123” and “321” parts are different with each URL. For example, a few URL’s might be (NOTE: the URL’s may be embedded within a load of other text, rather than them being one per line):

    and I want to extract them as

    So, I would use a find expression of:{3})/(d{3})

    and use the following Replacement Expression to extract the text to a new line:

    IF incremental searching was enabled along with Output Bar, all the results would appear in the Output bar (one result per line), updating as I type the find/replacement expressions. To create a new document with all matches, I would click the “Extract All” button on the Find dialog.

    This would not be possible with multiple selection editing you mention.

    Plus, I don’t particularly want to modify the original document/text, but instead just find all text matching a pattern and extract the replacement.


    Yutaka Emura

    Hello Deipotent,

    Thank you for explaining. I am getting to understanding your task.

    How about this procedure below?

    1) Press Ctrl + F to bring up the Find dialog box, type “{3})/(d{3})”, check “Use Regular Expressions”, and click “Find All”. Alternatively, you can add “{3})/(d{3})” to the marker with the Regular Expression checked, right-click on this marker, and select “Find All”.

    2) Make sure “Sticky Vertical Mode” is set by selecting “Edit” > “Selection Mode” > “Sticky Vertical Mode”. This will make sure a newline is inserted for each selection.

    3) Ctrl + C to select all selections.

    4) Ctrl + N to open a new document.

    5) Ctrl + V to paste all the clipboard contents.

    6) Ctrl + H to bring up the Replace dialog box, and replace “{3})/(d{3})” with

    For 6), you could click the marker and select “Replace”, but current beta version has a bug. I will fix this on the next beta version.

    I can also write a macro to automate this process if you would like.

    Thank you!



    Hi Yutaka,

    Your solution would work in a round-about way, but I would still like my suggestion to be implemented as it has some advantages:

    1) It’s a 1 step operation (ie. open find/replace, with Incremental Search and Use Output Bar enabled, and start typing your find/replace expression). Yes, automating with a macro would help with this issue, and I like the way that EmEditor can be scripted, but it doesn’t feel as intuitive for what I’m trying to do.

    2) Most importantly – You get immediate, real-time/incremental feedback on the results via the Output Bar. This is a killer feature.

    Plus, as I’ve mentioned before, EmEditor already has most of the required functionality built-in, so I can’t believe it would be that difficult to add this feature. Essentially, it needs one main thing – a “Use Output Bar” option for the Find/Replace dialogs which, when enabled, will output all Find matches (if on the Find dialog), or all the Replacement matches (if on the Replace dialog).

    If “Incremental Search” is enabled the Output bar is updated in real-time with the results, and if “Incremental Search” is disabled the results will only appear in the Output Bar if Find All button is pressed (NOTE: you can add a Find All button to the Replace dialog which causes all Replacement matches to appear in the Output Bar).

    The one other thing you caould add to both dialogs would be an “Extract All” button which would create a new document containing all find results, one per line.

    You could take this feature quite a bit further than this, but I would be happy with the above features for starters.


    Yutaka Emura

    Hello Deipotent,

    Thank you for explaining. I am beginning to understand your task, but the question is how many users would use this feature. Even adding an extra button “Extract All” in the Find/Replace dialog will certainly annoy some users. I want the user interface as simple as possible.

    I would also like to hear from other users about this topic.




    Yutaka wrote:

    I would also like to hear from other users about this topic.


    I hope I get was were suggested here correctly.

    I myself use EmEditor also often to search, manipulate
    and extract parts of many kinds of log files.

    SO this are my opinions:


    As you know I like “[ ] Use Output Bar” to get a list
    of clickable LINES with matches for the find dialog too.
    (I was not able to utilize “Find In Files” for that,
    and it make more sense to have that in the ‘normal’ find dialog too anyway)


    An kind of “live preview” in the output bar of what the search expression would match would be nifty.
    But there are other ways also already. Not as nifty, but…. ok.

    An option “extract matches to output bar” would be handy and welcome.

    The output bar should have an context menu option “copy selected to new document”
    (Instaed of the “Extract All” button)
    In the new document we can further work on extracted items.


    The find dialog could well need options to decide what to extract:
    – whole lines with found matches
    – the matches itself only

    That can be achieved also by utilizing regular expressions.
    That is why I had suggested to add an favorite menu
    to the Find/Replace dialog to store nifty regexs’

    – the respective negation of the above (extract everything not matched)

    That can be achieved also by utilizing scripts.
    But that is an often needed features so I would suggest
    to add a checkbox “[ ] Find opposite”


    To add this all to the find dialog I would suggest
    to put some of that options to the [Customize] settings

    as that are mostly set-and-forget options, e.g.:

    [ ] Move to Start/End of Document
    [ ] Close when Finished

    or to rarely used options
    [ ] Search All Open Documents
    [ ] Use Output Bar

    – – –

    Note: ‘utilizing bookmarks’ is a nice and nifty feature,
    but if you had used boomarks already in the document
    I don’t want to add more bookmarks from searching.

    I want to add that a few of my wishes to add some additional macro commands
    are meant to provide an macro to cover some, if not all of this above issues ;-)




    Yutaka wrote:
    Hello Deipotent,

    Thank you for explaining. I am beginning to understand your task, but the question is how many users would use this feature. Even adding an extra button “Extract All” in the Find/Replace dialog will certainly annoy some users. I want the user interface as simple as possible.

    I would also like to hear from other users about this topic.


    I second “[ ] Use Output Bar” option.
    Many uses emeditor as a text reader, for them, bookmarks should be… well, bookmarks.
    So I suggest emeditor to replace the “bookmark all” in Find dialoag with “use output bar”, and from output bar the user will be allowed to bookmark all lines, extract all matching words or lines or copy all,etc.
    by doing this, the user is not forced to use bookmarks as a temp processing tool if he doesn’t want to, but those who do can still utilize that.
    What do you think?



    Hi Yutaka,

    Now EmEditor is at v15.1.5, and my suggestion for incremental text extraction still hasn’t made it into EmEditor yet.

    Any chance this can be added in the near future ?

    As already mentioned, I can’t believe it would be that much work given that EmEditor already contains most of the functionality. All you need to do is…

    – Allow Find and Replace dialogs (and Find/Replace toolbar) to output to Output Bar
    – If incremental Search is enabled, then any matches are added to the Output bar as you type. This is particularly useful if you’re using a regex, since it allows you to see exactly what will be matched with current regex, thereby helping you to create the correct regex.
    – If the user also has a replacement regex, then there should be an option on Replace dialog (or toggle button on FindBar toolbar) to extract the replacement text (useful when you use Regex to transform the matches into something else).

    There are some extra things that would be nice, but the above would be a start.

    If you still don’t understand what I’m after, I’ll put together a screencast showing a demo of another piece of software which has the kind of functionality I’m after in EmEditor.

    Please, Please, Please, can you add this feature ?

Viewing 15 posts - 16 through 30 (of 31 total)

You must be logged in to reply to this topic.