Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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?
[Corion]: "Unmatched ) in regex; marked by <-- HERE in m/(&#9583;&# 9633;)&#9583;&# 65077; &#9531;&#9473;&# 9531;) <-- HERE / at -e line 1." :)
[Corion]: Meh - my "flip the table" string doesn't render here ;)
[choroba]: It renders correctly in pm-cb-g
[erix]: heh
[Veltro]: is it a question?
[erix]: or a conundrum?
[Veltro]: and if I may give you a hint, use qr/\xC2\xB0|\xB0/ instead of the degree sign

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2018-07-17 16:08 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 (372 votes). Check out past polls.

    Notices?