Skip to content

Instantly share code, notes, and snippets.

@0racle
Last active April 5, 2016 03:19
Show Gist options
  • Save 0racle/50d37f6351a3227a65caa1da97abb39d to your computer and use it in GitHub Desktop.
Save 0racle/50d37f6351a3227a65caa1da97abb39d to your computer and use it in GitHub Desktop.
> my @bots = <Optimus Bluestreak Ironhide Jazz Ratchet Sideswipe Sunstreaker Trailbreaker>
[Optimus Bluestreak Ironhide Jazz Ratchet Sideswipe Sunstreaker Trailbreaker]

> @bots.first(/streak/)  
Bluestreak

> @bots.first(/streak/, :end)
Sunstreaker

> @bots.first(/streak/, :kv) 
(1 Bluestreak)

> @bots.first(/streak/, :end, :kv)
(6 Sunstreaker)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment