Python and Regex - Replace Date : <p>I have multiple strings in the form of : </p>

<pre><code>AM-2019-04-22 06-47-57865BCBFB-9414907A-4450BB24
</code></pre>

<p>And I need the month from the date part replaced with something else, for example:</p>

<pre><code>AM-2019-07-22 06-47-57865BCBFB-9414907A-4450BB24
</code></pre>

<p>How can I achieve this using python and regex?</p>

<p>Also, I have multiple text files that contain a line similar to this:</p>

<pre><code>LocalTime: 21/4/2019 21:48:41
</code></pre>

<p>And I need to do the same thing as above (replace the month with something else).</p>
