Guest User

Untitled

a guest
May 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. $ script/console
  2. Loading development environment (Rails 2.1.1)
  3. >> a = "content_30[]=31&content_30[]=32&content_30[]=34&content_30[]=33"
  4. => "content_30[]=31&content_30[]=32&content_30[]=34&content_30[]=33"
  5. >> a.scan(/\=(\d+)/)
  6. => [["31"], ["32"], ["34"], ["33"]]
  7. >> a.match('\=(\d+)').to_a
  8. => ["=31", "31"]
Add Comment
Please, Sign In to add comment