title: Apps Srcipt indexOf() not working properly
body: <p>I am reading the body text of emails. You can check how the body appears in the photo attached.</p>
  <p>I want to get the following substring: 'Current status- ROB2ReOnb&quot;. I am noticing that when the text I am looking for, is not on the same row, the indexOf gives me &quot;-1&quot;. However, when is on the same row I can get a positive value for the indexOf.</p>
  <p>My code is the following:</p>
  <p><code>current_status = body.substring(body.indexOf(&quot;Current status -&quot;),body.indexOf(&quot;Active with App&quot;))</code></p>
  <p>Do you know what can I be doing wrong? I am trying to spot the error for so long. Any tip/clue is more than welcome.</p>
  <p><a href="https://i.stack.imgur.com/C5hRa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C5hRa.png" alt="![enter image description here" /></a></p>