Pra*_*tha 5 ruby regex ruby-on-rails-3
当我拆分字符串"hello world/n"时
"hello world \n".scan(/\w+/)
我明白了 ["hello", "world"]
["hello", "world"]
我想将\n或\ t计为字符串.
Dut*_*tow 5
你想要这样的东西吗?
"hello world \n".scan(/\w+|\n/)
归档时间:
14 年,6 月 前
查看次数:
3455 次
最近记录:
12 年 前