Flowdock
method

names

Importance_1
Ruby latest stable (v1_9_3_392) - 0 notes - Class: Regexp
names() public

Returns a list of names of captures as an array of strings.

/(?<foo>.)(?<bar>.)(?<baz>.)/.names
#=> ["foo", "bar", "baz"]

/(?<foo>.)(?<foo>.)/.names
#=> ["foo"]

/(.)(.)/.names
#=> []
Show source
Register or log in to add new notes.