Advanced "Replace" function

  • Hello guys!

    Great to find such a nice forum for N++ maybe I might find some information concerning my issue here.
    I think the search and replace funtion in N++ is really great but sometimes I feel like there is missing an option… or I have no idea how to use it properly. But after studiing the help files and some internet searching I’m still kind of stupid.

    Here is an example of what I’m trying to do.
    For example I have an XML file and need to find a word/expression. If this word/expression is found I need to search in the same line for a second word/expression and replace it by something else.

    For example: Search for “LargeRock02”

    • <Shape shapeId=“168” name=“LargeRock02” translation="-11.197 -1.40177 6.79036" rotation=“0 60.9952 1.04951e-013” scale=“0.1 0.1 0.1” static=“true” clipDistance=“800” nodeId=“5546” materialIds=“14” castsShadows=“true” receiveShadows=“true”/>

    When it’s found search for materialIds=“14” when found, replace by for example materialIds=“32”

    I hope I explained it easy to understand and hope you guys could give me a hint of what I’m doing wrong in the search/replace tool or if it is even possible to do such a thing. I tried some Plugins like “Analyse Plugin” but it didn’t give me the function I’m looking for.

    Thanks a lot in advance guys and please keep up the great work!
    Cheers, mailman

  • PUSH PUSH :-D nobody a suggestion?

  • The PythonScript plugin could do it (with the requirement you know Python) or just use a regular expression

    Search for

    Replace with

Log in to reply