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
Post a Comment