Skip to content

Instantly share code, notes, and snippets.

@pointcom
Created January 8, 2018 10:19
Show Gist options
  • Save pointcom/0850169106fb277d0110b4bea813562e to your computer and use it in GitHub Desktop.
Save pointcom/0850169106fb277d0110b4bea813562e to your computer and use it in GitHub Desktop.
# 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