How to CAPITALIZE many character in string with iMacros Eval

时间:2016-02-03 04:17:22

标签: eval imacros

How to replace many character with their CAPITALIZED form in a string/array in iMacros ( a to A , b to B etc)

hopely i can get my problem with imacros.. i just wanna do :

tag 1 is abcd, and i want replace it with ABCD (capital).

for replace many character to one character usualy i use this code

" SET !EXTRACT EVAL("'{{!EXTRACT}}'.replace(/[():;?!': '' ']/g, '-');") "

its mean replace char / [ \ ( \ ) : ; ? ! to " - "

but how to replace per character like a to A, b to B (capital)

thanks for your attention..

1 个答案:

答案 0 :(得分:1)

我几乎没有开始使用iMacros,但我发现你的问题想要回答我自己的问题,不久之后我在维基中发现了这个问题:

操纵提取

将提取转换为大写字符:

    VERSION BUILD=7400919 RECORDER=FX
    TAB T=1
    URL GOTO=http://android-developers.blogspot.com/2011/09/preparing-for-handsets.html
    SET !EXTRACT_TEST_POPUP NO
    TAG POS=1 TYPE=P ATTR=TXT:Early<SP>this<SP>year,* EXTRACT=TXT
    SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s.toUpperCase()")
    PROMPT {{!VAR1}}

这是页面: http://wiki.imacros.net/EVAL

希望它有所帮助。