字符串处理,满足以下要求:
1、单词首字母转换为大写
输入 hello word
输出 Hello WORD
2、数字与字母或字母与数字间均用下划线(_)隔开
this is zhe first time to go shopping buy 8apple
this is zhe first time to go shopping buy 8_apple
3、多个空格转换为一个
输入 wo shi yi ming he ge xue sheng
输出 wo shi yi ming he ge xue sheng
------解决方案--------------------------------------------------------
要满足多种条件,用正则表达式吧
------解决方案--------------------------------------------------------
楼上的给个详细的啊 正则表达式 貌似好深奥啊
------解决方案--------------------------------------------------------
第一个参考js版
http://ming358721.blog.51cto.com/2306530/414483