in reply to Re^6: Any good ways to handle NARROW NO-BREAK SPACE characters in regex in newer versions of Perl?
in thread Any good ways to handle NARROW NO-BREAK SPACE characters in regex in newer versions of Perl?
This is no different than before with get_all_files_in_dir. The program is effectively doing
local $_ = "Screenshot-2024-02-23-at-1.05.14\xE2\x80\xAFAM.png"; /Screenshot-2024-02-23-at-1.05.14\s/
That will only match if U+E2 is a space character, and it isn't.
These would match:
local $_ = "Screenshot-2024-02-23-at-1.05.14\x{202F}AM.png"; /Screenshot-2024-02-23-at-1.05.14\s/
local $_ = "Screenshot-2024-02-23-at-1.05.14\xE2\x80\xAFAM.png"; utf8::decode( $_ ); /Screenshot-2024-02-23-at-1.05.14\s/
|
|---|