I'm stuck on that one
I thought it would be something like
Code:
$signature = preg_replace("/(\[)(size)(=)(['\"]?)([0-9]*)(\])/siU", "[size=".iif('\\5'==1, 1, 2)."]", $signature);
But the expression '\\5'==1 always returns false, even when it is 1. \\5 is correct. Don't know why it won't work. regexp is so bloody hard. Maybe someone more advanced than me can say what would be the right way.