I need to read data from the file.
f=open("essay.txt","r")
my_string=f.read()
The below string which starts with \nSubject:
and ends with \n
is in the my_string
Example:
"\nSubject: Good morning - How are you?\n"
How can I search for the string which starts with \nSubject:
and ends with \n
?
Is there any python function to search for particular pattern of a string ?