edinvnode
edinvnode

Reputation: 3547

iMacros using EVAL to replace text

How to use EVAL command to replace some text in string and return it back to different variable?

I want ti replace $ character in extracted text and any other string like ABSD or #EANF#.

I have this.

SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s.replace(/\$/g, "");") 

Upvotes: 0

Views: 8483

Answers (1)

Shugar
Shugar

Reputation: 5299

SET !VAR1 EVAL("'{{!EXTRACT}}'.replace(/[\\$|ABSD|#EANF#]/g, '');")

Upvotes: 2

Related Questions