/\b$BOESESWORT\b/
QuoteFor code points below 256 ...
if locale rules are in effect ...
The POSIX class matches according to the locale,
http://perldoc.perl.org/perlrecharclass.html#POSIX-Character-ClassesThere are various other synonyms that can be used besides the names listed in the table. For example, \p{PosixAlpha} can be written as \p{Alpha} . All are listed in Properties accessible through \p{} and \P{} in perluniprops, plus all characters matched by each ASCII-range property.
Both the \p counterparts always assume Unicode rules are in effect. On ASCII platforms, this means they assume that the code points from 128 to 255 are Latin-1, and that means that using them under locale rules is unwise unless the locale is guaranteed to be Latin-1 or UTF-8. In contrast, the POSIX character classes are useful under locale rules. They are affected by the actual rules in effect, as follows:
If the /a modifier, is in effect ...
Each of the POSIX classes matches exactly the same as their ASCII-range counterparts.
otherwise ...
For code points above 255 ...
The POSIX class matches the same as its Full-range counterpart.
For code points below 256 ...
if locale rules are in effect ...
The POSIX class matches according to the locale, except that word uses the platform's native underscore character, no matter what the locale is.
if Unicode rules are in effect or if on an EBCDIC platform ...
The POSIX class matches the same as the Full-range counterpart.
otherwise ...
The POSIX class matches the same as the ASCII range counterpart.
1
2
3
4
5
6
7
8
9
10
11
12
$ export LANG="en_US.UTF-8" ; perl -E "say 'testärger' ~~ /^\p{Alpha}+$/i"
1
$ export LANG="en_EN.UTF-8" ; perl -E "say 'testärger' ~~ /^\p{Alpha}+$/i"
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_EN.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
1
1
2
3
4
5
6
7
8
9
10
$ ls -1d /usr/share/locale/en*
/usr/share/locale/en
/usr/share/locale/en@boldquot
/usr/share/locale/en@quot
/usr/share/locale/en_AU
/usr/share/locale/en_CA
/usr/share/locale/en_GB
/usr/share/locale/en_NZ
/usr/share/locale/en_US
/usr/share/locale/enm
1
2
3
4
5
6
7
8
9
10
root@svr2 ~ # perl -E'no warnings; use locale; say +(sort grep /\b/, map { chr } 0..1024), "\n";'
_̸̨̲ƀƂƃƄƅƉƋƌƍƑƒƔƖƗƚƛƜƝƞƤƥƦƧƨƩƪƫƬƭƮƱƲƸƹƺƻƼƽƾǀǁǂǃȔȖȠȡȢȣȴȵȶȷȸȹȺȻȼȽȾȿɀɁɂɃɄɅɆɇɈɉɊɋɌɍɎɏɐɑɒɕɘɚɜɝɞɟɡɢ
ɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿˀ
ˁˆˇˈˉˊˋ
ˌˍˎˏːˑˠˡˢˣˤˬˮ̴̵̶̷̡̢̧̛̖̗̘̙̜̝̞̟̠̣̤̥̦̩̪̫̬̭̮̯̰̱̳̹̺̻̼͇͈͉͍͎̀́̂̃̄̅̈̉̍̎̏̐̑̒̓̔̽̾̿̀́͂̓̈́͆͊͋͌̕̚ͅ͏͓͔͕͖͙͚͐͑͒͗͛ͣͤͥͦͧͨͩͪͫͬͭͮͯ͘͜͟͢͝͞͠͡ͰͱͲͳʹͶͷͺͻͼͽϏϗϘϙϛϝϟϡϴϵϷϸϹϺϻϼϽϾϿ0123456789aAăĂǎǍǻǺǟǞǡȧǠȦąĄāĀȁȀȃȂǽǣǼǢbB
ɓƁcCćĆĉĈčČċĊƈƇdDďĎđĐɖɗƊdzDzDZdžDžDŽeEĕĔěĚėĖȩȨęĘēĒȅȄȇȆǝəɛƎƏƐfFgGǵǴğĞĝĜǧǦġĠǥǤģĢɠƓƣƢhHĥĤȟȞħĦƕǶiIĭĬǐǏĩ
ĨįĮīĪȉȈȋȊıİijIJjJĵĴǰkKǩǨķĶƙƘlLĺĹľĽŀĿłŁļĻljLjLJmMnNńŃǹǸňŇņŅʼnŋŊnjNjNJoOŏŎǒǑȫɵƟȪőŐȭȬȯȱȮȰǿǾǫǭǪǬōŌȍȌȏȎơƠɔ
ƆœŒpPqQĸrRŕŔřŘŗŖȑȐȓȒsSśŚŝŜšŠşșŞȘſtTťŤŧŦţțŢȚuUŭŬǔǓůŮǘǜǚǖǗǛǙǕűŰũŨųŲūŪȕȗưƯvVwWŵŴƿǷxXyYŷŶŸȳȲƴƳȝȜ
zZźŹžŽżŻƶƵȥȤʒƷǯǮΑαΆάΒβϐΓγϜΔδϫϪΕεΈέΖζϨϩΗηΉήΘθϑΙιϳΊίΪϊΐΚκϞϰϦϧΛλΜμΝνΞξΟοΌόΠπϖΡρϱΣσϲϚςϬϭΤτϮϯΥυϒϓ
ΎύΫϋϔΰΦφϕϤϥΧχϠΨψϢϣΩωΏώЀ
setlocale(LC_ALL,'de_DE.utf8');
1
2
3
4
5
6
7
8
9
10
11
$ perl -v | grep version
This is perl 5, version 16, subversion 0 (v5.16.0) built for x86_64-linux
$ locale | grep LC_CTYPE
LC_CTYPE="en_GB.UTF-8"
$ perl -w -E "use locale; use POSIX qw(locale_h); setlocale(LC_CTYPE,'de_DE.utf-8'); say 'betätigt' ~~ /bet\b/"
1
$ perl -w -E "use POSIX qw(locale_h); setlocale(LC_CTYPE,'de_DE.utf-8'); say 'betätigt' ~~ /bet\b/"
$ perl -w -E "say 'betätigt' ~~ /bet\b/"
$
1
2
3
4
5
6
7
8
9
$ /usr/bin/perl -v | grep version
This is perl 5, version 12, subversion 4 (v5.12.4) built for x86_64-linux
$ /usr/bin/perl -w -E "use locale; use POSIX qw(locale_h); setlocale(LC_CTYPE,'de_DE.utf-8'); say 'betätigt' ~~ /bet\b/"
1
$ /usr/bin/perl -w -E "use POSIX qw(locale_h); setlocale(LC_CTYPE,'de_DE.utf-8'); say 'betätigt' ~~ /bet\b/"
1
$ /usr/bin/perl -w -E "say 'betätigt' ~~ /bet\b/"
1
$
1
2
3
4
5
6
7
8
9
$ perl -v | grep version
This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux
$ /usr/bin/perl -w -E "use locale; use POSIX qw(locale_h); setlocale(LC_CTYPE,'de_DE.utf-8'); say 'betätigt' ~~ /bet\b/"
1
$ /usr/bin/perl -w -E "use POSIX qw(locale_h); setlocale(LC_CTYPE,'de_DE.utf-8'); say 'betätigt' ~~ /bet\b/"
1
$ /usr/bin/perl -w -E "say 'betätigt' ~~ /bet\b/"
1
$