I have the following line:
[{names: {en: "US 30 - 5 Minute Level", es: "US 30 - 5 Minute Level"}, status: "A", displayed: "Y", start_time: "2011-05-20 00:00:00", start_time_xls: {en: "20th of May 2011 00:00 am", es: "20 May 2011 00:00 am"}, suspend_at: "2011-05-20 16:53:48", is_off: "Y", score_home: "", score_away: "", bids_status: "", period_id: "", curr_period_start_time: "", score_extra_info: "", settled: "N", ev_id: 2688484, ev_type_id: 10745, num_mkts: 5, venues: {en: "", es: ""}, disporder: 2040, ev_stream_available: false}]
I need to surround all variable names with quotation marks so that this is confirmed as JSON. I did the following, but also shared the dates.,
Regex.Replace(input, @"(\w+:)", "\"$0\":", RegexOptions.None);
Exit after Regex.Replace:
[{"names" {"en" "US 30 - 5 Minute Level", "es" "US 30 - 5 Minute Level"}, "status" "A", "displayed" "Y", "start_time" "2011-05-20 "00""00"00", "start_time_xls" {"en" "20th of May 2011 "00"00 am", "es" "20 May 2011 "00"00 am"}, "suspend_at" "2011-05-20 "16""53"48", "is_off" "Y", "score_home" "", "score_away" "", "bids_status" "", "period_id" "", "curr_period_start_time" "", "score_extra_info" "", "settled" "N", "ev_id" 2688484, "ev_type_id" 10745, "num_mkts" 5, "venues" {"en" "", "es" ""}, "disporder" 2040, "ev_stream_available" false}]
How can I change this to ignore them? Also, what a good web resource you can get at the bottom of regular expressions once and for all ?!
Thanks.