Ray's playground

 

Recipe 1.4. Reversing a String by Words or Characters

Code
Because the regular expression /(\s+)/ includes a set of parentheses, the separator strings themselves are included in the returned list.

posted on 2009-09-23 22:19  Ray Z  阅读(150)  评论(0编辑  收藏  举报

导航