searchtextreplaceimacros

Search and replace text with IMACROS


I just made this macro

SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:product-form ATTR=ID:Name EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
SET !EXTRACT NULL

TAG POS=1 TYPE=A ATTR=TXT:IT
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:product-form ATTR=ID:Locales_0__Name CONTENT={{!VAR1}}

After this, I would like to check all the text inside {{VAR1}}, in order to correct part of grammal errors like "é" instead of "è" and something like this.

How can I do this?


Solution

  • You can use the EVAL command for this purpose. For example:

    SET !VAR1 EVAL("\"{{!EXTRACT}}\".replace(/é/g, \"è\");")
    

    http://wiki.imacros.net/EVAL