title: Text replacement on different lines
body: <p>I have multiple entries in a file as mentioned below.</p>
  
  <pre><code> "Item_1";"Item_1";"Products///Item///ABC///XYZ";"Item_1.jpg}";"";"Buy item
   &lt;br&gt;&lt;strong&gt;Items&lt;/strong&gt;
   &lt;br&gt;&lt;strong&gt;Time&lt;/strong&gt;";"";"";"";"";"";"Category: M[Item]";"";"";"Y";"N";"N";"None";""
  
   "Item_2";....
  </code></pre>
  
  <p>In above text, there is a newline after "Buy item" in the first line &amp; after '/strong>' in second line.</p>
  
  <p>The change which I want to make is - </p>
  
  <pre><code>1. Replace Products///Item///ABC///XYZ with Products///ABC///XYZ
  2. Replace "Category: M[Item]" with "Category: M[ABC]"
  3. In case if Entry 1 is Products///Item///ABC or Products///ABC, I dont want to change "Category: M[Item]" with "Category: M[ABC]", just change Products///Item///ABC to Products///ABC
  </code></pre>
  
  <p>I am trying to read entire file line by line &amp; then split by '///' storing number of entries &amp; storing 3rd entry. But this creates issues as I have multiple newlines.</p>
  
  <p>Is there a simpler way of doing it by using regex or something else?</p>