Skip to content

Instantly share code, notes, and snippets.

@HungYuHei
Created October 18, 2011 03:21
Show Gist options
  • Select an option

  • Save HungYuHei/1294536 to your computer and use it in GitHub Desktop.

Select an option

Save HungYuHei/1294536 to your computer and use it in GitHub Desktop.
ruby1.9.2 中文 正则
"中文嚟嘎".match(/\p{han}+/u)
/@([\w\p{han}]{2,12})/ # 长度为@2-12的中英字符
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment