Create a program that uses regular expressions to find all instances of a specific pattern in a text file.
import re
pattern = r'\bt\w+'
with open("text.txt", "r") as file:
text = file.read()
matches = re.findall(pattern, text)
print("Matches found:")
for match in matches:
print(match)
GUYS IF YOU HAVE ANY DOUBT. PLEASE LET ME KNOW