Php - 如何从特定字符串中删除数字?

I need to remove a number only from a specific string. In particular:

$item = preg_replace('/\d+/u', '', $item);

but in this way it replaces all numbers from all strings. I instead need to remove only number after string 'team'.

How can I do this?

team2567 = team;
season1617 = season1617;

Thanks a lot!

make it like

$item = preg_replace('/team\d+/u', 'team', $item);

Use Positive Lookbehind

$item = preg_replace('/(?<=team)\d+/u', '', $item);
 $str = 'In My Cart : 11 12 items';
 preg_match_all('!\d+!', $str, $matches);
 print_r($matches);

Do something like

$item = preg_replace('/team\d+/u', 'team', $item);

or with capturing group

$item = preg_replace('/(team)\d+/u', '$1', $item);

or with positive lookbehind

$item = preg_replace('/(?<=team)\d+/u', '', $item);