Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2018-01-21 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (227 votes). Check out past polls.

    Notices?