2011-10-16 34 views

回答

0

你可以使用字符串拆分方法。最簡單的方法。

ruby-1.9.2-p290 :004 > a = 'http://share.findmespot.com/shared/faces/viewspots.jsp?glId=0rEE45o3ERRryMevW5teqS9gkNI' 
=> "http://share.findmespot.com/shared/faces/viewspots.jsp?glId=0rEE45o3ERRryMevW5teqS9gkNI" 
ruby-1.9.2-p290 :005 > b = a.split('=')[1] 
=> "0rEE45o3ERRryMevW5teqS9gkNI"