http://share.findmespot.com/shared/faces/viewspots.jsp?glId=0rEE45o3ERRryMevW5teqS9gkNI
Asked
Active
Viewed 173 times
0

Danger Angell
- 349
- 2
- 15
-
Check this answer, you can find multiple solutions there: http://stackoverflow.com/questions/2500462/how-to-extract-url-parameters-from-a-url-with-ruby-or-rails – Tamás Barta Oct 16 '11 at 18:30
1 Answers
0
You can do using the string split method. Easiest way.
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"

Kassym Dorsel
- 4,773
- 1
- 25
- 52