- Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
- string(69) "my_file_name_w_ith_illegal_cha_racters\"that_are_not\allowed_here.txt"
<?php
$name = 'my file:name?w[ith/illegal*cha]racters\"that<are>not\allowed|here.txt';
$newName = preg_replace('/[\?\/:|<>*\[\]\(\)\$%\{\}@~\s]/', '_', $name);
var_dump($newName);