Created
November 30, 2022 20:49
-
-
Save MelanieS/c4e4142a2777c38e75838ee9b5f743c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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