So i have a string with flags like this: <<-- name -->> and now I want to replace all of them for ''.
I made the following function:
function removeFlags($output) {
$output = preg_replace('/\<<--[^-->>]+-->>/', '', $output);
return $output;
}
It works fine for the most flags but not when they contain numbers. For example: <<-- Model -->> will just be replaced for '', but <<-- 360 -->> will not be removed.
What am I doing wrong?