From: Ari Brown Date: 2007-08-21T04:44:10+09:00 Subject: Regexp: named captures How do named captures in Ruby work? This is what I've tried: irb(main):001:0> if /(?.+)/ =~ /ari/ irb(main):002:1> puts $name irb(main):003:1> end SyntaxError: compile error (irb):1: undefined (?...) sequence: /(?.+)/ from (irb):3 and if I do this: irb(main):007:0> if /(.+)/ =~ /ari/ irb(main):008:1> puts $name irb(main):009:1> end TypeError: can't convert Regexp into String from (irb):7 I get a Regexp => String error. Bwah? aRi -------------------------------------------| Nietzsche is my copilot