I've got the following snippet:
$file = '/mnt/stoneshare/cache/video/10_12_101_38/000/011/M00001.mp4';
preg_match('/[\/\\](\d+_\d+_\d+_\d+)[\/\\]/', $file, $matches);
var_dump($matches);
Which, apparently, produces:
preg_match(): Compilation failed: missing terminating ] for character class at offset 27
Yet, when I run the same example in an online test tool, it works.
What is the problem here?