我下面对红宝石的正则表达式的教程工作,但似乎不工作 Tutorial
re = /(\w*)\s(\w*),\s?([\w\s]*)/
match1 = str1.match re
match2 = str2.match re
match1.regex # => wsw,s[ws] (this is IRB's unique way of showing regular express
我正在使用rails4。我想在我的网址中使用短划线( - ),如/ specials-race。我使用的代码,如 root 'static_pages#index'
match '/', to: 'static_pages#index', via: 'get'
match '/services', to: 'static_pages#services', via: 'get'
match '