I have the following string:
string = "asflkjsdhlkjsdhglk<body>Iwant\to+extr@ctth!sstr|ng<body>sdgdfsghsghsgh"
I would like to extract the string between the two <body>
tags. The result I am looking for is:
substring = "<body>Iwant\to+extr@ctth!sstr|ng<body>"
Note that the substring between the two <body>
tags can contain letters, numbers, punctuation and special characters.
Is there an easy way of doing this?