in reply to Re: 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?
I'm not sure what I have. The file definitely has an invisible character in it. When I copy and paste the file name:
Works:
perl -wMstrict -lE "qq/Screenshot-2024-02-23-at-1.05.14 AM.png/ =~ /A/ + and say 'OK' or die"
Doesn't work:
perl -wMstrict -lE "qq/Screenshot-2024-02-23-at-1.05.14 AM.png/ =~ /\s +/ and say 'OK' or die"
The character between the "4" and "A" is the invisible character.
$PM = "Perl Monk's";
$MC = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar Parson";
$nysus = $PM . ' ' . $MC;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Any good ways to handle NARROW NO-BREAK SPACE characters in regex in newer versions of Perl?
by haukex (Archbishop) on Aug 13, 2024 at 16:02 UTC | |
|
Re^3: Any good ways to handle NARROW NO-BREAK SPACE characters in regex in newer versions of Perl?
by ikegami (Patriarch) on Aug 13, 2024 at 16:06 UTC |