Skip to content

Instantly share code, notes, and snippets.

@j4zzcat
Created April 3, 2017 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j4zzcat/342d3415850f666f9b5e9e5b0cf941d8 to your computer and use it in GitHub Desktop.
Save j4zzcat/342d3415850f666f9b5e9e5b0cf941d8 to your computer and use it in GitHub Desktop.
r = %r{^/user/(?<user_id>.*)/login}
r.match '/user/1234/login' # => #<MatchData "/user/1234/login" user_id:"1234">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment