Skip to content

Instantly share code, notes, and snippets.

@plusor
Created June 17, 2013 03:55
Show Gist options
  • Save plusor/5794573 to your computer and use it in GitHub Desktop.
Save plusor/5794573 to your computer and use it in GitHub Desktop.
Ruby 正则使用命名群组. 经常忘记格式怎么写
/(?<foo>regexp)/ =~ "regexp"
foo # => "regexp"
@plusor
Copy link
Author

plusor commented Jul 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment