I want to replace what is between the }string{ with }string%{
I'm adding the the %
to edit a search query.
string example - {a26f089ed1530be8648027b493a21bfd44c5fb15d632afc8f1c539c7c3da88a4}out{a26f089ed1530be8648027b493a21bfd44c5fb15d632afc8f1c539c7c3da88a4}
The 2 values between the pair of curlies changes each time {rAndows2ring}
I've tried a lot of variations and closest I've got to is;
$where = preg_replace("/\}([^}]+)\{/", "}$1%{", $where);
But that returns an extra % at the first {.
%{212190298d692385253efb2a1062006ddf3ea008e3cdc2f8b8f11884ec863202}out%{212190298d692385253efb2a1062006ddf3ea008e3cdc2f8b8f11884ec863202}
thanks in advance!