Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^5: Unicode substitution regex conundrum

by Lu. (Hermit)
on Dec 16, 2007 at 22:39 UTC ( #657329=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -le 'print "ok" if ("我走" =~ m/\w+/)'
    $ perl -le 'print "ok" if ("hi" =~ m/\w+/)'
    ok
    
  2. or download this
    $terms =~ s/($word)\p{IsSpace}*($word)/$1 AND $2/g for 1..2;
    
  3. or download this
    $terms =~ s/(\p{IsSpace}/ AND /g;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://657329]
help
Chatterbox?
and dust plays in a shaft of sunlight...

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










    Results (215 votes). Check out past polls.

    Notices?