[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: equivalent idiom for ruby " perl -pe 's/(\d+)/localtime($1)/e '"

Peña, Botp

3/21/2005 7:10:00 AM

WATANABE Hirofumi [mailto:eban@os.rim.or.jp] wrote:

//$1 becomes a result of the match last time, beause $1 is
//evaluated before gsub! is called.
// ...
//% echo 1111111111 |ruby -pe 'sub(/^\d+/){Time.at($&.to_i)}'
//Fri Mar 18 10:58:31 JST 2005
//

That explains it clearly. Thanks for the great tip, eban.

kind regards -botp

//--
//eban
//


1 Answer

Joe Giglio

4/22/2010 3:04:00 PM

0

On Apr 22, 5:33 am, "hw" <nos...@home.net> wrote:
> "charles robinson" <robinsonch...@comcast.net> schrieb im Newsbeitragnews:hqoc93$mcj$1@news.albasani.net...
>
> > The other day I stated that I liked something a little bit more modern
> > stylistically. Since then I've run across this one which changes my whole
> > perception of what they are doing. Here they do a great interpretation of
> > the the Wes Montgomery classic Jingles:
> >http://www.youtube.com/watch?v=U...
> > Charlie
>
> i have to admit that that was not my cup of tea at all.

nor mine-hate to say it but...