import re


def FileAnalysis(FileName, Pattern, Flag=re.M):
	""" Analyses the content of a file and returns all matching occurrences of Pattern
	"""
	Filin = open(FileName,"r")
	FContent = Filin.read() + '\n'
	Filin.close()
	R = re.findall(Pattern,FContent,flags=Flag) # default: Multiline analysis
	return R