How can I parse this text using regex (ruby)? -


I am trying to parse that information, for example, get airtime ,

airtime @ Monday 08:00 am

I want to get "airtime @" later by the end of the line, Just come out with "Monday at 08:00" How can I do this?

Is there any reason that you do not use XML feeds?

  Requires' Open-Yuri 'Requirement' Nokogiri 'D = Nakogiri.XML (Open' http://services.tvrage.com/feeds/showinfo.php?sid= 15614 ') name = D.search (' // showameame '). Text # = & gt; 'Chak' day = D. Search ('// Airway'). Text # = & gt; 'Monday' time = D. Search ('// airtime'). Text # = & gt; '20: 00 'net = D. Search ('// network [@ country = "US"]'). Text # = & gt; 'NBC' puts # {time} on # {net} AR # {time} on time # {time}. "#Chuck at NBC on Monday 20:00.  

Comments