Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25890

    jic
    Participant

    Greetings!

    Imagine the following file:
    –next line is top of file–
    >
    > From: yuu-yoo-users <yuu-yoo-users-bounces@mailinglists.place.org> on behalf of Jose Isaias Cabrera <jicman@27hello.com>
    > Sent: Sunday, June 16, 2019 10:38 PM
    > To: Yuu-yoo mailing list
    > Subject: Re: [Yuu-yoo] check-in: 29-382340-b8-e66
    >
    >
    –Above line is bottom of file–

    What I want to end up with is,

    –next line is top of file–

    Jose Isaias Cabrera <jicman@27hello.com>
    > Sent: Sunday, June 16, 2019 10:38 PM
    > To: Yuu-yoo mailing list
    > Subject: Re: [Yuu-yoo] check-in: 29-382340-b8-e66
    >
    >
    –Above line is bottom of file–

    and I am using this macro,

    #title=””
    #tooltip=”Reply To Email”,1033
    #icon=”default.ico”
    document.selection.SelectAll();
    document.selection.Replace(“^”,”> “,eeReplaceAll | eeFindReplaceRegExp,0);
    document.selection.SelectAll();
    document.selection.Replace(“.* on behalf of “,”\n”,eeReplaceAll | eeFindMatchDotNL |eeFindReplaceRegExp,0);

    and this works, somewhat, but this is what I end up with,
    –next line is top of file–
    >

    Jose Isaias Cabrera <jicman@27hello.com>
    > Sent: Sunday, June 16, 2019 10:38 PM
    > To: Yuu-yoo mailing list
    > Subject: Re: [Yuu-yoo] check-in: 29-382340-b8-e66
    >
    >
    –Above line is bottom of file–

    I want that > taken out also. Any help would be greatly appreciated. Thanks.

    #25966

    LTT
    Participant

    Hello jic,

    If this topic is not resolved yet, try this macro:
    (Here I’m only talking about multi-line replacing, according to your macro. Actually you can use other way to achieve the result, e.g. by moving cursor and deleting the unwanted part via the macro.)

    document.selection.Replace(“^”, “> “, eeReplaceAll | eeFindReplaceRegExp);
    document.selection.SelectAll();
    editor.ExecutePlugin(“Snippets.dll”, eePluginUserMessage, 0, “$0${SelText/[\\s\\S]* on behalf of /\\n/}”);

    http://www.emeditor.org/en/history_v15_5.html
    The new ExecutePlugin method allows you to call plug-in features from within macros. This allows, for example, a snippet feature temporarily even when the Snippets plug-in is not running. See “Examples to call plug-ins from macros” below (in the page).

    http://www.emeditor.org/en/macro_editor_editor_executeplugin.html
    http://www.emeditor.org/en/howto_plugin_plugin_snippets.html

    ——————————
    The common way for multi-line replacing (that I know, and that you used) would be verbose. And I failed for this reason:

    The line begins with ** in this page:
    https://www.emeditor.com/forums/reply/25947/

    The 1st ** in this page:
    https://www.emeditor.com/forums/topic/advanced-search-options/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.