i not understandy i am getting the error preg_match(): Unknown modifier '2'
here is my code i trying to parse the audio format.
/**
* @param string $name
* @return string|null
*/
public static function parseAudioFormat(string $name): ?string
{
$Audios = ['AAC', 'AC-3', 'DTS', 'DTS-HD Master Audio', 'DTS-ES', 'DTS 96/24', 'E-AC-3', 'FLAC', 'MP2', 'MP3', 'Opus', 'PCM', 'TrueHD', 'Atmos', 'Vorbis'];
foreach ($Audios as $audio) {
if (preg_match("/\b($audio)\b/i", $name, $m)) {
return $m[0];
}
}
return false;
}