I want to remove brackets and number from beginning of string but problem is brackets and number is coming only specific string not all.
for example following is my string.
1) [4] Mustangs 8u
2) Pool a First Place
3) Team slect
4) [3] In pruduct
so above you can see only 1 and 4 string have number with brackets at beginning of string so i want to only remove that if that found in string.
I write following code but is not work.
<?php
foreach ($grouped as $round_number => $group) {
$team_1_name = $group->team_1_name;
$new_str = preg_replace('/^([0-9]* \w+ )?(.*)$/', '$2', $team_1_name);
$date = date ('F d, Y g:iA', $unix_time);
}
?>