Skip to content

Instantly share code, notes, and snippets.

@hackugyo
Last active March 9, 2016 04:22
Show Gist options
  • Save hackugyo/ac1322a8fa2f240adbf6 to your computer and use it in GitHub Desktop.
Save hackugyo/ac1322a8fa2f240adbf6 to your computer and use it in GitHub Desktop.
丸囲み文字が我慢できないときに、Rubyで置換するスクリプト
def destroy_circled(text, suffix = '. ')
text
.gsub('①', '1' + suffix)
.gsub('②', '2' + suffix)
.gsub('③', '3' + suffix)
.gsub('④', '4' + suffix)
.gsub('⑤', '5' + suffix)
.gsub('⑥', '6' + suffix)
.gsub('⑦', '7' + suffix)
.gsub('⑧', '8' + suffix)
.gsub('⑨', '9' + suffix)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment