ใช้ regex ดึง tags ทั้งหมดในสตริงที่กำหนด
ตัวอย่าง
import re
rex = re.compile(r'[\<\>]')
l = "this is text1 hi this is text2"
print(rex.findall(l))
ผลลัพธ์
['<', '>', '<', '>']
ใช้ regex ดึง tags ทั้งหมดในสตริงที่กำหนด
import re
rex = re.compile(r'[\<\>]')
l = "this is text1 hi this is text2"
print(rex.findall(l))
['<', '>', '<', '>']