I want to delete specific Wordwraps in a file.
The file looks like this:
<Text>
<TextNr>0</TextNr>
<TextStr>AckReq</TextStr>
</Text>
<Text>
<TextNr>1</TextNr>
<TextStr>AckReq</TextStr>
</Text>
And after the deleting Wordwrap function it should be:
<Text><TextNr>0</TextNr><TextStr>AckTra</TextStr></Text>
<Text><TextNr>1</TextNr><TextStr>AckReq</TextStr></Text>
So after <Text>
it should delete all Wordwraps until </Text>
and there it should make a new line.
How can I delete Wordwraps using a regex?
The Regex is something like this:
r'<Text>[\r\n]+<TextNr>(\d+)</TextNr>[\r\n]+<TextStr>(\w+)</TextStr>[\r\n]+</Text>[\r\n]+'