Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2018-07-16 11:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (333 votes). Check out past polls.

    Notices?