I have an issue with the character 'é'.
With a ftp_nlist($this->ftpStream, $directory);
I've a string like that 'Parté.mp4' but the 'é' doesnt match the regex [\p{L}]*\.mp4
There are example here:
The one who work : http://regex101.com/r/yH9xG0/1
The one who doesn't: http://regex101.com/r/bI4lN2/2
The ASCII code of the 'é' who doesn't work is '101 204 129'.
The function ord($e);
where $e is the weird character return '101' which is the code of the simple letter e.
It's seems like my 'é' is composed of three characters because I've to make a
$e = substr($fileName,4,3);
to obtain my single character.
I would like to be able to authorize these characters in my regex... If you have any leads, thanks.
Use the extended unicode option.
Regex Demo
Here's the PHP manual that describes the extended unicode option.