C++ replacing character in strings : <p>Im currently trying to capitalize the character 'i' but only if it's by itself </p>

<p>this is the code i have </p>

<pre><code>int main()
{
    string textMessage = "Yesterday’s Doctor Who broadcast made me 
    laugh and cry in the same episode! i can only wonder what the 
     Doctor will get into next. My family and i are huge fans.";


replace(textMessage.begin(), textMessage.end(), 'i', 'I');

 cout &lt;&lt; textMessage;

}
</code></pre>

<p>my output is </p>

<p><code>Yesterday’s Doctor Who broadcast made me laugh and cry In the same epIsode! I can only wonder what the Doctor wIll get Into next. My famIly and I are huge fans.</code></p>

<p>this is the output i want</p>

<p><code>Yesterday’s Doctor Who broadcast made me laugh and cry in the same episode! I can only wonder what the Doctor will get into next. My family and I are huge fans.</code></p>
