Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ script/console
- Loading development environment (Rails 2.1.1)
- >> a = "content_30[]=31&content_30[]=32&content_30[]=34&content_30[]=33"
- => "content_30[]=31&content_30[]=32&content_30[]=34&content_30[]=33"
- >> a.scan(/\=(\d+)/)
- => [["31"], ["32"], ["34"], ["33"]]
- >> a.match('\=(\d+)').to_a
- => ["=31", "31"]
Add Comment
Please, Sign In to add comment