Sunday, 31 January 2016

EPSILON EXTENSION LANGUAGE - EEL

String replacement code in eel


  • Open Epsilon editor
  • Create a file using command Ctrl-X-Ctrl-F
  • Write the name of file “String_Replacement” and extension should be “.e” now the file name would be “String_Replacement.e” (file name can be any but extension should be .e)
  • Hit the enter
  • Now inside the file write below code 
#include "eel.h"

command rep1()
{
    string_replace("%<name>([^<>]+)%</name>", "<surname>#1</surname>", REGEX);
}
  • Now compile using ALT-F3
  • Run the command you made rep1 (command name can be any)
  • Run command, Alt-X
  • Command name, rep1
  • Hit the enter.
Please watch the video for better understanding:

13 comments:

  1. how to replace the below type of tags
    %([^<>]+)% to #1

    ReplyDelete
    Replies
    1. It will be rear case so here we need to use simple replace, or if it is data is global I will have to make a regex for such kind of data. Let me know if it is global or just send me your file in my email id gusainkamlesh2@gmail.com and will check and let you know.

      Delete
  2. thanks your kindness. in this field nobody share there knowledge, but you done it.. thanks..i want to know that if i want exact replace than what should i do...

    ReplyDelete
    Replies
    1. You can #define CASE-FOLD/MODEFOLD in the beaning of e file, just check source code available in bin. You can do it!

      Delete
  3. How could i replace multiple tags and also content text? with the help of single command or Using macro

    ReplyDelete
    Replies
    1. With the help of regex you can do it send me your data file I will make a macro or e file and also teach you how to do that. Gusainkamlesh2@gmail.com skype kamlesh.gusain

      Delete
  4. This comment has been removed by the author.

    ReplyDelete
  5. how to replace junk characters or special characters in eel?

    ReplyDelete
  6. Hi, Please could you some tips of eel.h macro in id sequence.

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. Hai
    Can you please guide me about .b from .e file

    ReplyDelete
  9. Hi,
    Can anyone suggest that how would exact ([A-Z]+) replace

    ReplyDelete
  10. Hi sir,
    how to execute this code in multiple files at a time?

    ReplyDelete