Need to modify a simple regex
<p>I use this regex <code>!\{t\}([^\{]+)\{/t\}!</code> to match <code>{t}Any string here{/t}</code>. Now I need to add an optional backslash in the pattern to in front of the slash to match <code>{t}Any string here{\/t}</code> as well.</p>

<p>Those are some pattern I tried but didn't work:</p>

<ul>
<li><code>!\{t\}([^\{]+)\{\\?/t\}!</code></li>
<li><code>!\{t\}([^\{]+)\{(\\)?/t\}!</code></li>
<li><code>!\{t\}([^\{]+)\{[\\]?/t\}!</code> </li>
</ul>