Got a rude reminder of my cluelessness this morning, losing over an hour trying to figure out why my regex wasn't working on files with a spaces in them. Turns out they weren't spaces but UTF-8 characters, NARROW NO-BREAK SPACE.
I'm running a newer version of Perl, 5.36. I see old posts about this issue but nothing recent. Wondering if there is a clean way of handling these things other then doing a tr// on every string. Ideally, I'd like to get \s to match it.
$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
In reply to Any good ways to handle NARROW NO-BREAK SPACE characters in regex in newer versions of Perl? by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |