I have written the following pattern to match an empty paragraph at the end of HTML:
https://regex101.com/r/6TNgUV/1
But when I try the following Python code,