How to identify and extract patterns from emails I would like to know if it would be possible to identify some patterns in a text.
For example, looking at emails, there is some common words used at the beginning and at the end. 

Dear Mr Pascal, 

We regret to inform you that we will not be able to respect the deadline previously agreed for the delivery of your order. Our supplier has warned us today that they are experiencing supply problems, which will result in a delay in our production chain. We count on your understanding and thank you for your patience. 

Please accept our apologies.

Best regards,

Matt


If I look at emails, they usually start with Dear/Hi/Hello/Good morning..., then the title/name of a person/company; the body; and the conclusion (I look forward to hearing from you; kind regards, best regards;....). 
I would like to ask you, therefore, if there is a way to collect information about these patterns and also if it is possible to classify emails by the patterns.
It depends exactly on which kind of patterns you are talking about. Are they deterministic? That is, they are all the same, so you want to get everything after Dear, or before Att / Best Regards, you can explore regular expression patterns. In python, you can use re library:

https://docs.python.org/3/library/re.html

There are books about regular expressions, so this is a big topic and a strong start if you want to check patterns.

Other kind of tasks you could do:


Word Embeddings on raw e-mails to check word similarity.
Clustering e-mails using Bag-of-Words or Word Embeddings.
Label af set o e-mails and train a supervised algorithm to predict an outcome of interest.


Anyway, text mining is really a big discipline, so if you want a more precise answer, I would recommend to narrow down your question.

Hope it helps.