ruby on rails - How would I parse this url to get the id? -


i want parse url using ruby id 33: http://www.domain.com/?id=33

how this?

with regular expression /\d+\z/. can build such 1 using rubular example. given expression extracts id under condition, no other characters follow post id , id contains digits.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -