// Copyright 2014 Apple Inc.  All Rights Reserved.
new ReverseTemplateList([new ReverseTemplate("bestwestern.co.uk-en",function(e){return/Booking Confirmation/.test(e.subject)},function(e){if(int(e.epoch)<1325376e3)return CONTINUE;if(/Booking Cancellation/.test(e.subject))return STOP;if(/Booking Confirmation/.test(e.subject)){var t=Scanner.fromMessage(e);t.setLocale("en_US");var n,r,a,o,i,s,c,u,p,g,m;i=t.getSpan().innerCapture(/\bConfirmation number: (\d+)/,1),r=t.getSpan().innerCapture(/\bTotal booking cost: [^d]?($<price>[\d,.]+)[^d]?\s\(($<currency>.+)\)/),a=r?r.$price:null,o=r?r.$currency:null,n=t.getSpan().nextText("Named Guest:").parentTag("td3").tagContents().innerCapture(/Named Guest:\s+(.+)/,1),s=t.getSpan().nextText("Check-in:").nextDate(),c=t.getSpan().nextText("Check-out:").nextDate(),g=t.getSpan().nextText("Contact number:").parentTag("table3").innerPhoneNumber();var T=t.getSpan().nextText("BEST WESTERN").parentTag("td2").tagContents();if(m=""+T.innerCapture(/.+\n\n(.+)/,1),p=T.innerCapture(/(.+)\n/,1),ASSERT(s,c,m))return[{"@context":"http://schema.org","@type":"http://schema.org/LodgingReservation",underName:{"@type":"http://schema.org/Person",name:n},totalPrice:a,priceCurrency:o,checkinTime:s,checkoutTime:c,reservationStatus:"http://schema.org/ReservationConfirmed",reservationId:i,reservationFor:{"@type":"http://schema.org/LodgingBusiness",name:p,url:u,telephone:g,address:m}}]}},"0/1/2/3/4/5/651/688/689","SG865c0699")]);