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'
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|