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

Python __call__ special method practical example -

arrays - jQuery - Retrieve values from HTML elements and return their sum -