NuttyCoder's profile初级程序员BlogLists Tools Help

Blog


    3/26/2008

    Replace String whit Regular Expression in Editplus

    Sometimes we need to replace strings in the same pattern in Editplus. For example, I have to add post-fix to "jsxname" attribute for every component in a UI file(XML) just now. These attributes appear as '<record jsxname="......">'.

    Pattern: jsxname="([^"]*)"

    [^"]: any charactor except ".

    [^"]*: a string without ".

    (): Affects evaluation order of expression and also used for tagged expression.

    Replace With: jsxname="\1_100"

    \1: evaluate [^"]* in ().