[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

what does %r

John Ab

10/2/2008 7:49:00 PM

match = url.match(%r[http://(.+).site.com/a-(\d+).html])
my question is what is this %r, i know that %w(x 1 2)=['x','1','2'] but
what's %r,
can i read more about these percents?
links please
--
Posted via http://www.ruby-....

2 Answers

Sebastian Hungerecker

10/2/2008 8:03:00 PM

0

John Ab wrote:
> my question is what is this %r

Regex literal. Like // but without the need to escape any slashes in the re.

> can i read more about these percents?

http://www.zenspider.com/Languages/Ruby/Quick...

HTH,
Sebastian
--
Jabber: sepp2k@jabber.org
ICQ: 205544826

John Ab

10/2/2008 8:16:00 PM

0

thank you very much
--
Posted via http://www.ruby-....