Skip to content

Instantly share code, notes, and snippets.

@MelanieS
Created November 30, 2022 20:49
Show Gist options
  • Save MelanieS/c4e4142a2777c38e75838ee9b5f743c4 to your computer and use it in GitHub Desktop.
Save MelanieS/c4e4142a2777c38e75838ee9b5f743c4 to your computer and use it in GitHub Desktop.
string = "This is a Ruby tutorial."
# Here we will return an array containing each instance of i
string.scan('i')
# This code returns ["i", "i", "i"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment