Hello I need to replace mediawiki H1 markup (`=title=`) with double equal signs (`==Title==`).

I need however to leave Mediawiki H2 markup (`==title=`=) unchanged.

So the following:

```
=This is title=    ==This is subtitle== ===This is sub sub title===

```

should become:

```
==This is title==    ==This is subtitle== ===This is sub sub title===

```

using:

```
preg_replace('/(\={1})(.*)\\1/mU', '==\\2==', $s);

```

however I obtain

```
==This is title== ====This is subtitle==== ======This is sub sub title======

```

I gues it is greedily matching also the equal sign appearing inside the capture and doubling it...
Can anyone help?