View Single Post
  #6 (permalink)  
Old 04-23-2008, 08:24 PM
shaalini shaalini is offline
D-Web Analyst
 
Join Date: Apr 2007
Posts: 342
shaalini is on a distinguished road
Default Re: Ruby Regular Expression

There is another way of using regular expressions.Since Ruby is an object-oriented programming language, the "johnsays" expression becomes a member of the Regexp class, which is the regular expressions class in Ruby.

Therefore, you could also write the expression as

johnsays = Regexp.new(‘\d\d:\d\d’)
__________________
Shaalini.S
Be the Best of Whatever you are...
Reply With Quote