reg = /(.*)\s([0-9]\s.*)/
s = " IANS 3 September 2009, 02:57pm IST "
reg.match(s)
location = $1.strip # = "IANS"
plain_content = $2.strip # = "3 September 2009, 02:57pm IST"
Thanks & Regards,
Dhruva Sagar.


Ogden Nash <http://www.brainyquote.com/quotes/authors/o/ogden_nash.html>  -
"The trouble with a kitten is that when it grows up, it's always a cat."

On Fri, Sep 11, 2009 at 4:28 PM, Sandip Ransing <san2...@gmail.com> wrote:

> Thanks !
>
>
> What will be the regular expression to extract
> *IANS* and *3 September 2009, 02:57pm IST*
> from following string
>
> *" IANS 3 September 2009, 02:57pm IST "*
>
>
> Sandip
> --
> Ruby on Rails Developer
> http://sandip.sosblog.com
> http://funonrails.wordpress.com
> www.joshsoftware.com
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to