Peter Bhat Harkins @pushcx@octodon.social
Follow

Ruby regexp quirk, apparently undocumented: if you name a capture, you lose unnamed captures.

"ab".match(/(a)(b)/).captures => ["a", "b"]
"ab".match(/(a)(?<b>b)/).captures => ["b"]

· Web · 0 · 0