I have a dictionary :
{'...': '...',
'unite_fonctionnelle': 'text to keeep',
'...': '...'}
In this case the dictionary is good but sometimes the value of unite_fonctionnelle
need to be cleaned, the syntaxe is always the same:
{'...': '...',
'unite_fonctionnelle' : 'asjbzjqnfknqfsnf<Run>text to keeep</Run>qsdqsdqsdqsfqsfegdhfkdnh',
'...': '...'}
I want to transform the value of unite_fonctionnelle
when tags <Run>
and </Run>
are present in the string to keep only the text between the two tags. How can I do this with split() ?