read pattern content from text file using regex in Microsoft full stack developer