From: Olivier Lance Date: 2011-08-29T23:30:59+09:00 Subject: Re: String#split resets regex captures variables (Ruby 1.8.7) Hi all, thanks for all your replies and tests, I wasn't expecting so many answers :) I'm sorry, my example was indeed a bit complicated to illustrate the issue. The night got my brain, I should have slept ^^ Anyway, thanks for highlighting the different behaviors of those variables... I'm actually working on a code I haven't written, so I left it as untouched as possible (as it was working) and patched with what I needed. I'll have a closer look to refactor it and use smarter/safer things. As I've said in my topic's subject, I'm using Ruby 1.8.7, so I think I cannot use named groups. What would you suggest instead of using $1 etc.? Should I store $~ and then use captures[1]...? Thanks for your help Olivier -- Posted via http://www.ruby-forum.com/.