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.34 KB | None | 0 0
  1. >> a = "content_30[]=31&content_30[]=32&content_30[]=34&content_30[]=33"
  2. => "content_30[]=31&content_30[]=32&content_30[]=34&content_30[]=33"
  3.  
  4. >> a.match('\=(\d+)')
  5. => #<MatchData:0x1f5d498>
  6.  
  7. >> a.match('\=(\d+)').to_a
  8. => ["=31", "31"]
  9.  
  10. >> a
  11. => "content_30[]=31&content_30[]=32&content_30[]=34&content_30[]=33"
  12. >> a.scan('\=(\d+)')
  13. => []
  14. >>
Add Comment
Please, Sign In to add comment