Skip to content

Instantly share code, notes, and snippets.

View yosiyuki's full-sized avatar

Yoshiyuki Sugimoto yosiyuki

  • Kaito Wings
  • Ho Chi Minh City, Vietnam
  • X @saigon
View GitHub Profile
@yosiyuki
yosiyuki / gist:3833736
Created October 4, 2012 14:08
Half width characters and full width characters
# check if value contains only half width chars
if value =~ /^[ -~。-゚]*$/
# check if value contains only full width chars
if value =~ /^[^ -~。-゚]*$/