String operation
What's simplest way to turn the string "YingYang" into "Ying/Yang"? 开发者_StackOverflow中文版
Assuming you want to insert a slash everywhere where a lower case letter is followed by a capital letter:
"YingYang".gsub(/([a-z])([A-Z])/, '\1/\2')
精彩评论