import re
def insert_divider(file_path):
with open(file_path, 'r', encoding='utf-8') as f:
html = f.read()
# We look for the logo img and the span title, and insert a divider between them.
# Pattern to match:
#
# بيان
# Let's match the closing bracket of the img tag (or its whitespace), followed by the span tag
pattern = r'(]+>)\s*(بيان)'
# The divider to insert:
divider = '\n