add text in multiple files

  • Hi,
    I need to insert a text, in multiple files.

    The text is always the same, and the position where I want to insert it is also the same in each file.

    The text is:

     <gco:CharacterString>open data</gco:CharacterString>

    and I want to put it after the line with this text:


    I think I should use the find and replace with regex, but I don’t know how.


  • @Stefano-Schiavini

    Regular expressions (regex) is the way to go:

    Search for: </gmd:resourceMaintenance>(\R)

    and Replace with: ${0}<gmd:descriptiveKeywords>${1} <gmd:MD_Keywords>${1} <gmd:keyword>${1} <gco:CharacterString>open data</gco:CharacterString>${1} </gmd:keyword>${1} </gmd:MD_Keywords>${1}</gmd:descriptiveKeywords>${1}

  • thank you,

    exactly what I needed.
    works great.


Log in to reply