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:
<gmd:descriptiveKeywords> <gmd:MD_Keywords> <gmd:keyword> <gco:CharacterString>open data</gco:CharacterString> </gmd:keyword> </gmd:MD_Keywords> </gmd:descriptiveKeywords>and I want to put it after the line with this text:
</gmd:resourceMaintenance>I think I should use the find and replace with regex, but I don’t know how.
Stefano
-
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.Stefano
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login