Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: \b in Unicode regex

by kennethk (Abbot)
on May 22, 2017 at 15:00 UTC ( #1190858=note: print w/replies, xml ) Need Help??


in reply to \b in Unicode regex

Do you mean
$string =~ /$_/; $string =~ /\b$_\b/;
or do you really mean
$string =~ /\Q$_\E/; $string =~ /\b\Q$_\E\b/;
As soon as your variable contains Metacharacters, they are not the same. See quotemeta, Quoting metacharacters.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1190858]
help
Chatterbox?
[Discipulus]: good morning folks!

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2017-09-25 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (276 votes). Check out past polls.

    Notices?