import re with open('src/views/TaxiView.vue', 'r', encoding='utf-8') as f: text = f.read() # Just extract the content using regex template_match = re.search(r'\s*(.*?)', template_content, re.DOTALL) tab2_match = re.search(r'(.*?)\s*$', template_content, re.DOTALL) if tab1_match and tab2_match: tab1_code = tab1_match.group(1) tab2_code = tab2_match.group(1) # Clean up the `