import retemp = ''' <file> <fileType>Mezza</fileType> <fileName></fileName> <segments> </segments> </file>'''regex = re.compile(r'>[ \t]*</')replaced = re.sub(regex, ">[!] JSON value does not exist, Check your Json!</", temp)print(replaced)
Standard input is empty
<file> <fileType>Mezza</fileType> <fileName>[!] JSON value does not exist, Check your Json!</fileName> <segments>[!] JSON value does not exist, Check your Json!</segments> </file>
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!