[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Chopping the beginning of a string elegantly
From:       "francisrammeloo () hotmail ! com" <francisrammeloo () hotmail ! com>
Date:       2005-07-29 14:56:02
Message-ID: 1122648780.312210.111520 () g43g2000cwa ! googlegroups ! com
[Download RAW message or body]

Thanks all,

I eventually used this

thePane = line.scan(/Begin\w+/)[0].sub(/Begin/, "")

where line looks like this:
BeginCaption				0, 20, 66, ..

It looks a little better but still not very elegant. Is it possible to
make it even still shorter?

Best regards,
Francis


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic