Permalink
Browse files

numerous little fixups

  • Loading branch information...
1 parent 08d9699 commit cbbdf502409f4e4ff817bafa839751f2dbd9ff8b @rjbs rjbs committed Dec 24, 2011
Showing with 10 additions and 11 deletions.
  1. +10 โˆ’11 2011/articles/2011-12-24.pod
@@ -38,12 +38,12 @@ surprised face: ๐Ÿ˜
So, C<uni> is great for finding characters quickly by name. Sometimes, though,
you want to find characters based on other criteria. For example, when I see
-somebody trying to use C<m{\d}> to match ASCII digits. I want to give them an
+somebody trying to use C<m{\d}> to match ASCII digits, I want to give them an
example of some of the things that they really don't think should be matched.
Tom Christiansen is one of Perl's chief Unicode gurus, and he's written a bunch
-of weird and useful tools. brian d foy packaged it up and now it's easy for
-anybody to install it. One of the tools is C<unichars>, which lets you find
-characters based on many more criteria than its name. For example, to
+of weird and useful tools. brian d foy packaged those up and now it's easy for
+anybody to install them. One of the tools is C<unichars>, which lets you find
+characters based on many more criteria than their names. For example, to
enlighten the guy using C<m{\d}>, I want to find digits that aren't in C<[0-9]>
and I'm going to pick the seven from each script, because seven is a funny
number:
@@ -66,11 +66,10 @@ number:
I just specified my three criteria as arguments to the command:
- #!code
- $ unichars '\d' '$_ !~ /[0-9]/' 'NAME =~ /SEVEN/'
- a digit - \d
- not in [0-9] - $_ !~ /[0-9]/
- seven - NAME =~ /SEVEN/
+=for :list
+* a digit: C<\d>
+* not in [0-9]: C<$_ !~ /[0-9]/>
+* seven: C<NAME =~ /SEVEN/>
You could also replace that second rule with, say, C<'\P{ASCII}'>. There's
more than one way to do it. There are some important things to know, though.
@@ -79,13 +78,13 @@ multilingual plane or the so-called "astral" plane. That means that this vital
search will fail:
#!code
- $ unichars 'NAME =~ /FACE/'
+ $ unichars 'NAME =~ /WEARY/'
(nothing)
You meant:
#!code
- $ unichars -a 'NAME =~ /FACE/'
+ $ unichars -a 'NAME =~ /WEARY/'
๐Ÿ˜ฉ U+1F629 WEARY FACE
๐Ÿ™€ U+1F640 WEARY CAT FACE

0 comments on commit cbbdf50

Please sign in to comment.