I need to remove
[PRODUCT ID=123]
from text
Some random dummy [PRODUCT ID=123] text just for example [PRODUCT ID=321]
Where ID (after the = sign) can be any number (integer).
I've tried with PHP
preg_match_all("|[[^]]+](.*)[]/[^]]+]|U", $text, $out);
but it doesn't work as I thought it will so I'm trying with regex but currently I'm lost and I need your help.
Thank you.
[]pairs?