Created
April 11, 2014 10:57
-
-
Save mutsune/10458337 to your computer and use it in GitHub Desktop.
まったくつまらないものを作ってしまいましたが、絵文字を表す Unicode の正規表現を出力するワンライナーです
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval $(curl -s http://www.unicode.org/Public/6.0.0/ucd/EmojiSources.txt | awk -F";" ' BEGIN { printf "perl -MRegexp::Assemble::Compressed -le \047$r=Regexp::Assemble::Compressed->new; " } { if ($1 !~ /^#/ && $1 ~ /^[0-9A-Fa-f]+$/) printf "$r->add( \"" $1 "\" ); " } END { printf "print $r->re\047\n" } ') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment