From: Sebastian Hungerecker Date: 2008-07-25T16:58:39+09:00 Subject: Re: Regexp Ruby selection touffik@gmail.com wrote: > I thought the .. between 2 "line =~" was like (...) in rubular which > let catch the content ?? Generally in ruby .. denotes a range. Like starting_value .. end_value. In this case though it denotes a flip flop, which is evil and should never ever be used because it makes my head hurt. Here's what it does though: some_loop { do_something if foo .. bar } This will do nothing until foo is true. When foo is true it will do_something. It will then keep doing_something in every iteration of the loop until bar becomes true. After bar became true it will stop doing_something until foo is true again. So as a summary: It doesn't do what you thought it did. As a matter of fact it doesn't do anything sane. So just keep as far away from it as possible. HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826