title: Regex help - match any number of characters
body: <p>I have following kind of string-sets in a text file:</p>
  
  <pre><code>&lt;&lt; /ImageType 1
  /Width 986 /Height 1
  /BitsPerComponent 8
  /Decode [0 1 0 1 0 1]
  /ImageMatrix [986 0 0 -1 0 1]
  /DataSource &lt;
  803fe0503824160d0784426150b864361d0f8844625138a4562d178c466351b8e4763d1f904864523924964d27944a6552b964b65d2f984c665339a4d66d379c4e6753b9e4f67d3fa05068543a25168d47a4526954ba648202
  &gt; /LZWDecode filter &gt;&gt; image } def
  </code></pre>
  
  <p>There are 100s of Images defined like above. </p>
  
  <p>I need to find all such images defined in the document.<br>
  Here is my code - </p>
  
  <pre><code>string txtFile = @"text file path";
  string fileContents = File.ReadAllText(txtFile);
  
  string pattern = @"&lt;&lt; /ImageType 1.*(\n|\r|\r\n)*image } def"; //match any number of characters between `&lt;&lt; /ImageType 1` and `image } def`
  MatchCollection matchCollection = Regex.Matches(fileContents, pattern, RegexOptions.Singleline);
  int count = matchCollection.Count; // returns 1
  </code></pre>
  
  <p>However, I am getting just one match - whereas there are around 600 images defined.<br>
  But it seems they all are matched in one because of 'newline' character used in pattern.  </p>
  
  <p>Can anyone please guide what do I need to modify the correct result of regex match as 600.</p>