Skip to content

Instantly share code, notes, and snippets.

@litaocheng
litaocheng / match_zh.erl
Created May 22, 2012 12:04
从文件中提取中文
%%% 从文件中提取中文, 回答:http://erlangqa.com/382
%%% 假设src.txt内容为:
%%% hello自由 !
%%% 2012年5月22日
%%% cheng
%%%
%%% 执行:
%%% erlc match_zh.erl && erl -noinput -eval "match_zh:run(\"src.txt\"), init:stop()" && cat zh.txt
%%% L1 自由
%%% L2 日