Created
January 8, 2018 10:19
-
-
Save pointcom/0850169106fb277d0110b4bea813562e to your computer and use it in GitHub Desktop.
This file contains 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
# http://ruby-doc.org/core-2.5.0/MatchData.html#method-i-named_captures | |
# Ruby >= 2.4 | |
/(?<first_name>.+) (?<last_name>.+)/.match('Bobby Brown').named_captures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment