Created
August 31, 2009 08:21
-
-
Save qnighy/178354 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/ruby -Ku | |
# -*- coding: utf-8 -*- | |
r = /\A(([あいうえおか-もやゆよら-ろわ-んアイウエオカ-モヤユヨラ-ロワ-ヴ]|う゛)[ぁぃぅぇぉゃゅょゎァィゥェォャュョヮ]?){2}[×☆]?(([あいうえおか-もやゆよら-ろわ-んアイウエオカ-モヤユヨラ-ロワ-ヴ]|う゛)[ぁぃぅぇぉゃゅょゎァィゥェォャュョヮ]?){2}っ?!?\z/ | |
while l = gets | |
l.chomp! | |
if r.match(l) | |
puts "#{l}は4文字タイトルなんじゃないかなあ" | |
else | |
puts "#{l}は4文字タイトルじゃないんじゃないかなあ" | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment