Given your strings, they match fine with or without \b:
#!/usr/bin/perl -CS
use HTML::Entities;
my $string = decode_entities <DATA>;
$_ = decode_entities "שפירא";
print "matches: '$&'\n" if $string =~ /$_/;
print "matches too: '$&'\n" if $string =~ /\b$_\b/;
__DATA__
8^1589-20170113-102647-ויחי-דב
+12;י_הספד_על_הר
+ב_משה_שפירא.mp3
+^עברית^הרב מ
+504;שה גולד^ויח
+י-דברי הספד 
+506;ל הרב משה שפ
+;ירא, טו' טבת, ת
+;שע'ז^שיעורי
+501; בתנ"ך ובפרש
+;ת השבוע|שיע
+493;רים בפרשת ה
+שבוע|שיעור•
+7;ם קודמים|בר&#
+1488;שית|ויחי
__END__
Output:
matches: 'שפירא'
matches too: 'שפירא'
So, no issue with \b and unicode regex here.
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|