Regex in functionList.xml

  • Hello, I’m trying to add TradeXpress (RTE) in functionList.xml but my function list is always empty.

    RTE function is like:



    In functionlist.xml, I add:

    <association id= “rte_function” userDefinedLangName=“RTE” />
    <association id= “rte_function” ext=".rte />

    <parser id=“rte_function” displayName=“RTE”>
    <funcNameExpr expr="(^(begin)$)" />

  • @Nesarost

    unfortunately, afaik, you need to restart npp, or start another instance, every time you make changes to the functionList.xml. Did you do that?

    In order to keep the formatting of your posted content use three tildes before and after the text like
    and provide a sample of data with the information what you expect to see in function list, then it might be easier for others do digging around your issue.

  • Thanks for your reply.

    I was editing the wrong file. I have 2 functionList.xml, one in Program Files and one in Roaming.

  • Some remarks:

    • use “proper” double quotes i.e. ASCII \x22 only;
    • rename funcNameExpr to nameExpr (funcNameExpr-node is only used when the function/functionName-node is part of a classRange-node).
    • remove displayMode="$functionName", it isn’t used anyway

Log in to reply