#coding:utf-8

import re

s = '<html><head><title>Title</title>'
ss = '<aaa>|公式国名 = {{lang|en|United Kingdom of Great Britain and Northern Ireland}}<ref>'

match = re.match('<.*?>', ss).group(0)
print(match)

05ae3c62acbd8554a671436e2c5f1325419c27e1
<mask token>

<mask token>
print(match)

<mask token>
s = '<html><head><title>Title</title>'
ss = (
    '<aaa>|公式国名 = {{lang|en|United Kingdom of Great Britain and Northern Ireland}}<ref>'
    )
match = re.match('<.*?>', ss).group(0)
print(match)

import re
s = '<html><head><title>Title</title>'
ss = (
    '<aaa>|公式国名 = {{lang|en|United Kingdom of Great Britain and Northern Ireland}}<ref>'
    )
match = re.match('<.*?>', ss).group(0)
print(match)

#coding:utf-8

import re

s = '<html><head><title>Title</title>'
ss = '<aaa>|公式国名 = {{lang|en|United Kingdom of Great Britain and Northern Ireland}}<ref>'

match = re.match('<.*?>', ss).group(0)
print(match)
