Advanced Text Search in EmEditor - Easily Locate Words and Phrases

Advanced Text Search in EmEditor - Easily Locate Words and Phrases

Kevin Lv8

Advanced Text Search in EmEditor - Easily Locate Words and Phrases

October 12, 2008 at 4:54 am #6387

Yutaka Emura

Keymaster

iisisrael wrote:
I altered it a little to (almost) match what we want to accomplish:

s = document.selection.Text;
if (!s) { document.selection.FindRepeat(eeFindRepeatNext); }
else {
document.selection.Find(s, eeFindNext | eeFindReplaceRegExp);
}

However, the “document.selection.Find” doesn’t replace the string used by “document.selection.FindRepeat”! This means, when I select text and run this macro, then click to erase the selected found text, and run the macro again, it doesn’t repeat the find on the recently selected text find, but finds the text from the last “Find”. How do I replace the last “Find” value?

Also, if the currently selected text is selected as a result of the find, I don’t want that to become the new find string, I want to continue with the original find string. how do I check to make a distinction between a manually selected string and a string selected by a find? (i.e. I want to repeat my search for the regex, not the next resulting found string from the regex)

Thanks!

I don’t think there is a good way to replace the last Find value.

You might want to claer “Use Word at Cursor in Find/Replace Dialog Box” in the Search tab of the Customize dialog box so the Find string will always become the last searched string.

Also read:

https://techidaily.com
  • Title: Advanced Text Search in EmEditor - Easily Locate Words and Phrases
  • Author: Kevin
  • Created at : 2024-10-07 08:56:24
  • Updated at : 2024-10-14 08:06:56
  • Link: https://win-outstanding.techidaily.com/advanced-text-search-in-emeditor-easily-locate-words-and-phrases/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Advanced Text Search in EmEditor - Easily Locate Words and Phrases