Answer the question
In order to leave comments, you need to log in
Sublime Text 3 - how to remove all lines nested in a specific tag?
Given: a large xml file with metadata, in which there are extra tags with different content.
Task: remove from this file all lines starting and ending like this: <genre>%текст%</genre>
I am aware that ST3 has a search function that allows you to delete and edit multiple lines at once by keywords. But how to implement this if there is <genre></genre>,
different nested text inside the tag?
Is it possible somehow to highlight all tags <genre></genre>
including nested text?
Answer the question
In order to leave comments, you need to log in
Found a solution.
ctrl+F -> select icon with an asterisk (search by regular expressions), if you need to remove all tags <genre></genre>
with nested text, enter <genre>(.+?)</genre>
UPD. HELP
this formula works great, but if there are hyphens in the text, then the line is completely ignored. what else can be added to enable line breaks?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question