题解 | #单词倒排#
单词倒排
http://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
主要是正则表达式的运用: var input = readline(); var index = input.replace(/[^a-zA-Z]/g, " "); index = index.split(" ").reverse().join(" "); console.log(index);
单词倒排
http://www.nowcoder.com/practice/81544a4989df4109b33c2d65037c5836
主要是正则表达式的运用: var input = readline(); var index = input.replace(/[^a-zA-Z]/g, " "); index = index.split(" ").reverse().join(" "); console.log(index);
相关推荐