Skip to main content
10 events
when toggle format what by license comment
Jan 18, 2023 at 18:49 vote accept Sildoreth
Jan 18, 2023 at 18:36 answer added don_crissti timeline score: 3
Jan 18, 2023 at 18:20 history edited Sildoreth CC BY-SA 4.0
Further de-emphasize XML because everyone is still fixating on that.
Jan 18, 2023 at 18:08 comment added Gilles Quénot So remove XML and use simple lines of plain text
Jan 18, 2023 at 18:05 history edited Sildoreth CC BY-SA 4.0
Put question first since everyone is fixating on the fact that XML is involved.
Jan 18, 2023 at 18:00 comment added Sildoreth For my input files, I can assume that start and end tags are on their own line or both on the same line. So the problem is as simple as "which lines do I want to keep"? Again, the question has nothing to do with XML.
Jan 18, 2023 at 17:59 comment added terdon This is a very bad idea and it is impossible to do correctly (OK, it's possible but very, very hard even for experts). If you have XML, use an XML parser nor ad hoc regular expression parsing.
Jan 18, 2023 at 17:59 comment added Sildoreth @GillesQuenot The question has nothing to do with XML. The question on the last line of the original post is universal.
Jan 18, 2023 at 17:54 comment added Gilles Quénot Better add sample XML input, expected output. sed is not a XML parser
Jan 18, 2023 at 17:51 history asked Sildoreth CC BY-SA 4.0