1 2 Previous Next 20 Replies Latest reply on Oct 25, 2012 8:36 AM by philmodjunk

    How to parse out the Publisher from a text string

    PeterMontague

      Title

      How to parse out the Publisher from a text string

      Post

           I am trying to parse out the publisher. At the moment I'm using this calculation

            

           Let ( [ T = this::Child Source Code ;
                     start = Position ( T ; "<li><b>Publisher:</b>" ; 1 ; 1 ) + 22 ;
                     end = Position ( T ; ")</li>" ; 1 ; 1 )
                   ] ;
                   Trim ( Middle ( T ; start ; end - start ) )
                  )
           But this gets me all of the text between the tags

      <li><b>Publisher:</b> Poolbeg Press Ltd (11 Jan 1996)</li>

                 
           On other occasions the text between the tags is like this:
      <li><b>Publisher:</b> Jossey Bass; 1st edition (25 Oct 1993)</li>
            
           Is there a way to Get the Publisher without any other information or white spaces?

                 

                 

                 

            

        • 1. Re: How to parse out the Publisher from a text string
          davidanders

          http://www.mightydata.com/blog/parsing-like-a-pro/

          Example 1:

               You have a part number that has some logic built into it and you want to take that logic from a code to something a human understands.

               PartNumber 1: TX-157566WH3
               PartNumber 2: VA-156513WH2

               The format for the part number is State – Part Serial Number & Warehouse Number.

               Parse 1a: Let’s get the state first. (Note: The 2-letter state always has a dash after it. Always celebrate the easy victories!)

          Let(
          [
          pn = data::PartNumber ;
          dash = “-” ;
          pos = Position( pn ; dash ; 1 ; 1 )
          ] ;
          Left( pn ; pos - 1 ) // Minus 1 so that we don’t include the dash
          )

               Parse 1b: Let’s get the Part Number. (Note: The part number is between the dash and the “WH” that stands for warehouse).

          Let(
          [
          pn = Data::PartNumber ;
          dash = "-" ;
          wh = "WH" ;
          pos1 = Position( pn ; dash ; 1 ; 1 ) ; // Find the first occurrence of the dash
          pos2 = Position( pn ; wh ; 1 ; 1 ) // Find the first occurrence of "WH"
          ] ;
          Middle( pn ; pos1 + 1 ; pos2 - pos1 - 1 ) //Plus 1 to start on the character after the dash; minus 1
           to compensate for starting 1 character to the right than the dash
          )
          • 2. Re: How to parse out the Publisher from a text string
            philmodjunk
                 Let ( [ T = this::Child Source Code ;
                           start = Position ( T ; "<li><b>Publisher:</b>" ; 1 ; 1 ) + 22 ;
                           endParen = Position ( T ; "(" ; 1 ; 1 );
                           endSemi = Position ( T ; ";" ; 1 ; 1 )
                           end = If ( dndSemi ; EndSemi ; Min ( endParen ; endSemi )
                         ] ;
                         Trim ( Middle ( T ; start ; end - start ) )
                        )
                 This assumes that there will always be a left parenthesis after the publisher name, but that there may or may not be text to exclude after a semi-colon.
            • 3. Re: How to parse out the Publisher from a text string
              PeterMontague

                   Hi Phil There is not always a parenthesis as a finishing point.

                    

                   paperback:5031: <li><b>Publisher:</b> Swallows Tale Pr (Aug 1985)</li>
                    
                        missing manual:7669: <li><b>Publisher:</b> Pogue Press; 1 edition (2 Jun 2010)</li>
                         
                             hardcover:6375: <li><b>Publisher:</b> Jossey Bass; 1st edition (25 Oct 1993)</li>
                              
                             So how do I calculate for both eventualities?

                    

              • 4. Re: How to parse out the Publisher from a text string
                philmodjunk

                     All of your examples show such a parenthesis, but testing in the data viewer using each of your examples showed up a different flaw in the calcualtion. Here's an updated version that works with each example that you've posted to date:

                     Let ( [ T = this::Child Source Code ;
                               start = Position ( T ; "<li><b>Publisher:</b>" ; 1 ; 1 ) + 22 ;
                               endParen = Position ( T ; "(" ; 1 ; 1 );
                               endSemi = Position ( T ; ";" ; 1 ; 1 ) ;
                               end = If ( endSemi ; EndSemi ; endParen )
                             ] ;
                             Trim ( Middle ( T ; start ; end - start ) )
                           )

                • 5. Re: How to parse out the Publisher from a text string
                  PeterMontague

                       I don't know why but that is still not working for me.

                        

                  • 6. Re: How to parse out the Publisher from a text string
                    philmodjunk
                         

                              that is still not working for me.

                         doesn't give me anything to go on.

                         HOW isn't it working? What results are you getting? The wrong results or an empty string?

                    • 7. Re: How to parse out the Publisher from a text string
                      PeterMontague

                           Sorry. I'm getting a blank field. 

                           This is how I put it in:

                            

                           Let ( [ T = this::Child Source Code ;
                                     start = Position ( T ; "<li><b>Publisher:</b>" ; 1 ; 1 ) + 22 ;
                                     endParen = Position ( T ; "(" ; 1 ; 1 );
                                     endSemi = Position ( T ; ";" ; 1 ; 1 ) ;
                                     end = If ( endSemi ; EndSemi ; endParen )
                                   ] ;
                                   Trim ( Middle ( T ; start ; end - start ) )
                                 )
                           Here is an example of source code on which it didn't work:
                                 
                                 
                                 
                                    
                                    
                                    
                                 
                                  
                                  
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                   
                                    
                                 
                                 
                                 
                                  
                                  
                                  
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                  
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                  
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                    
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                    
                                    
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                <html>
                                <head>
                                <script type="text/javascript">/* <![CDATA[ */var ue_t0=ue_t0||+new Date();/* ]]> */</script>
                                <script type='text/javascript'>/* <![CDATA[ */
                                var ue_wl_jserr = 1,
                                ue_csm = window;
                                (function(a){a.ue_err={ec:0,pec:0,ts:0,erl:[],mxe:50,startTimer:function(){a.ue_err.ts++;setInterval(function(){a.ue&&(a.ue_err.pec<a.ue_err.ec)&&a.uex("at");a.ue_err.pec=a.ue_err.ec},10000)}};a.ueLogError=(function(){function b(c,e,d){if(a.ue_err.ec>a.ue_err.mxe){return}a.ue_err.ec++;a.ue.log({m:c,f:e,l:d,s:""},"jserr");return false}if(a.ue_wl_jserr){window.onerror=b}return function(c){if(a.ue_err.ec>a.ue_err.mxe){return}a.ue_err.ec++;a.ue_err.erl.push(c)}})()})(ue_csm);
                                 
                                /* ]]> */</script>
                                <script type='text/javascript'>/* <![CDATA[ */
                                var ue_id='0B0JQWVECQJ5MK4C8QQY',
                                ue_sid='275-8245022-0386016',
                                ue_mid='A1F83G8C2ARO7P',
                                ue_url='/The-VueScan-Bible-Everything-Scanning/dp/1933952695/ref=sr_1_1/uedata/unsticky/275-8245022-0386016/NoPageType/ntpoffrw',
                                ue_furl='fls-eu.amazon.co.uk',
                                ue_pr=0,
                                ue_navtiming=3,
                                ue_tags=1,
                                ue_ifr=1,
                                ue_tofc=0,
                                ue_log_idx=0;
                                if (!ue_csm) {var ue_csm = window;}
                                (function(f,a){f.ueinit=(f.ueinit||0)+1;f.ue={t0:a.aPageStart||f.ue_t0,id:f.ue_id,url:f.ue_url,a:"",b:"",e:"",ec:0,h:{},r:{ld:0,oe:0,ul:0},s:1,t:{},sc:{},iel:[],fc_idx:{}};if(f.ue_tags&&f.ue_tags==1){f.ue.tagC=function(){var h=[];return function(i){if(i){h.push(i)}return h.slice(0)}};f.ue.tag=f.ue.tagC()}f.ue.ifr=((f.ue_ifr)&&((a.top!==a.self)||(a.frameElement)))?1:0;function c(j,m,o,l){var n=l||(new Date()).getTime();var h=!m&&typeof o!="undefined";if(h){return}if(j){var k=m?e("t",m)||e("t",m,{}):f.ue.t;k[j]=n;for(var i in o){e(i,m,o[i])}}return n}function e(i,j,k){var l,h;if(i){l=h=f.ue;if(j&&j!=l.id){h=l.sc[j];if(!h){h={};k?(l.sc[j]=h):h}}l=k?(h[i]=k):h[i]}return l}function d(l,m,k,i,h){var j="on"+k;var n=m[j];if(typeof(n)=="function"){if(l){f.ue.h[l]=n}}else{n=function(){}}m[j]=h?function(o){i(o);n(o)}:function(o){n(o);i(o)};m[j].isUeh=1}function g(o,k,n){function j(L,J){var H=[L],C=0,I={};if(J){H.push("m=1");I[J]=1}else{I=f.ue.sc}var A;for(var B in I){var D=e("wb",B),G=e("t",B)||{},F=e("t0",B)||f.ue.t0;if(J||D==2){var K=D?C++:"";H.push("sc"+K+"="+B);for(var E in G){if(E.length<=3&&G[E]){H.push(E+K+"="+(G[E]-F))}}H.push("t"+K+"="+G[o]);if(e("ctb",B)||e("wb",B)){A=1}}}if(!l&&A){H.push("ctb=1")}return H.join("&")}function r(C,B,E,A){if(C==""){return}var D=new Image();if(f.ue.b){D.onload=function(){if(f.ue.b==""){return}var F=f.ue.b;f.ue.b="";r(F,B,E,1)}}if(!(f.ue_tofc&&f.ue.log&&window.amznJQ&&A)){f.ue.iel.push(D);D.src=C}if(f.ue_tofc&&f.ue.log&&(E||A)){f.ue.log(C,"uedata",{n:1})}if(f.ue_err&&!f.ue_err.ts){f.ue_err.startTimer()}}function x(A){if(!ue.collected){var C=A.timing;if(C){f.ue.t.na_=C.navigationStart;f.ue.t.ul_=C.unloadEventStart;f.ue.t._ul=C.unloadEventEnd;f.ue.t.rd_=C.redirectStart;f.ue.t._rd=C.redirectEnd;f.ue.t.fe_=C.fetchStart;f.ue.t.lk_=C.domainLookupStart;f.ue.t._lk=C.domainLookupEnd;f.ue.t.co_=C.connectStart;f.ue.t._co=C.connectEnd;f.ue.t.sc_=C.secureConnectionStart;f.ue.t.rq_=C.requestStart;f.ue.t.rs_=C.responseStart;f.ue.t._rs=C.responseEnd;f.ue.t.dl_=C.domLoading;f.ue.t.di_=C.domInteractive;f.ue.t.de_=C.domContentLoadedEventStart;f.ue.t._de=C.domContentLoadedEventEnd;f.ue.t._dc=C.domComplete;f.ue.t.ld_=C.loadEventStart;f.ue.t._ld=C.loadEventEnd}var B=A.navigation;if(B){f.ue.t.ty=B.type+f.ue.t0;f.ue.t.rc=B.redirectCount+f.ue.t0;if(f.ue.tag){f.ue.tag(B.redirectCount?"redirect":"nonredirect")}}f.ue.collected=1}}var z=!k&&typeof n!="undefined";if(z){return}for(var h in n){e(h,k,n[h])}c("pc",k,n);var t=e("id",k)||f.ue.id;var m=f.ue.url+"?"+o+"&v=20&id="+t;var l=e("ctb",k)||e("wb",k);if(l){m+="&ctb="+l}if(f.ueinit>1){m+="&ic="+f.ueinit}var w;if(document.ue_backdetect&&document.ue_backdetect.ue_back){w=document.ue_backdetect.ue_back;if(w.value>1){m+="&bf="+(w.value-1)}}if(f.ue._fi&&o=="at"&&(!k||k==t)){m+=f.ue._fi()}var i;if((o=="ld"||o=="ul")&&(!k||k==t)){var v=a.performance||a.webkitPerformance;if(o=="ld"){if(a.onbeforeunload&&a.onbeforeunload.isUeh){a.onbeforeunload=null}if(w){w.value++}if(f._uess){i=f._uess()}if(f.ue_navtiming&&v&&v.timing){e("ctb",t,"1");if(f.ue_navtiming==1){f.ue.t.tc=v.timing.fetchStart}else{if(f.ue_navtiming==3){f.ue.t.tc=v.timing.navigationStart}else{if(f.ue_navtiming==4){f.ue.t.tc=v.timing.requestStart}}}}}if(v){x(v)}if(f.ue.ifr){m+="&ifr=1"}}c(o,k,n);var s=(o=="ld"&&k&&e("wb",k));if(s){e("wb",k,2)}var u=1;for(var q in f.ue.sc){if(e("wb",q)==1){u=0;break}}if(s){if(f.ue.s!=0||!u){return}m=j(m,null)}else{if(u){var y=j(m,null);if(y!=m){f.ue.b=y}}if(i){m+=i}m=j(m,k||f.ue.id)}if(f.ue.b||s){for(var q in f.ue.sc){if(e("wb",q)==2){delete f.ue.sc[q]}}}var p=0;if(!s){f.ue.s=0;if(!f.ue_wl_jserr&&f.ue.e){m+="&ec="+f.ue.ec+f.ue.e;f.ue.e="";f.ue.ec=0}if(f.ue_wl_jserr&&f.ue_err&&f.ue_err.ec>0){m+="&ec="+f.ue_err.ec}p=e("ctb",k);e("t",k,{})}if(f.ue_tofc&&f.ue.tag&&p){f.ue.tag("ue_tofc")}if(!window.amznJQ&&f.ue.tag){f.ue.tag("noAmznJQ")}if(f.ue_tags&&f.ue_tags==1){if(m&&f.ue.tag&&f.ue.tag().length>0){m+="&csmtags="+f.ue.tag().join("|");f.ue.tag=f.ue.tagC()}}f.ue.a=m;r(m,o,p,s)}function b(){var j=f.ue.r;function i(l){return function(){if(!j[l]){j[l]=1;g(l)}}}f.onLd=i("ld");f.onLdEnd=i("ld");var h={beforeunload:i("ul"),error:function(n,l,m){f.ue.ec++;if(!ue.r.oe){f.ue.r.oe=1;f.ue.e+="&em="+escape(n)+"&eu="+escape(l)+"&el="+m}return false},stop:function(){g("os")}};for(var k in h){d(0,window,k,h[k])}if(a.addEventListener){a.addEventListener("load",f.onLd,false)}else{if(a.attachEvent){a.attachEvent("onload",f.onLd)}}f.ue._uep=function(){new Image().src=(f.ue_md?f.ue_md:"http://uedata.amazon.com/uedata/?tp=")+(+new Date)};if(f.ue_pr&&(f.ue_pr==2||f.ue_pr==4)){f.ue._uep()}if(f.queue){f.queue.replay=function(){while((nextArr=f.queue.remove("ue"))){nextArr[0].apply(this,nextArr.slice(1))}};f.queue.replay()}c("ue")}ue.reset=function(i,h){if(!i){return}f.ue_cel&&f.ue_cel.reset();f.ue.t0=+new Date();f.ue.rid=i;f.ue.id=i;f.ue.fc_idx={}};f.uei=b;f.ueh=d;f.ues=e;f.uet=c;f.uex=g;b()})(ue_csm,window);
                                 
                                 
                                (function(b){var a=b.ue;a.rid=b.ue_id;a.sid=b.ue_sid;a.mid=b.ue_mid;a.furl=b.ue_furl;a.lr=[];a.log=function(e,d,c){if(a.lr.length==500){return}a.lr.push(["l",e,d,c,a.d(),a.rid])};a.d=function(c){return +new Date-(c?0:a.t0)}})(ue_csm);
                                /* ]]> */</script>
                                 
                                 
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                 
                                 
                                 
                                 
                                 
                                <script type="text/javascript">(function(){var i=new Image;i.src = "http://ecx.images-amazon.com/images/I/51jp-az0noL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU02_.jpg";})();</script>
                                 
                                 
                                 
                                    
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                <style type="text/css"><!--
                                 
                                * html body { margin-top: 0px; }
                                .serif { font-family: times,serif; font-size: medium; } 
                                .sans { font-family: verdana,arial,helvetica,sans-serif; font-size: medium; }
                                 
                                .small { font-family: verdana,arial,helvetica,sans-serif; font-size: small; }
                                 
                                h2.small {margin-bottom: 0em; }
                                h2.h1 { margin-bottom: 0em; }
                                h2.h3color { margin-bottom: 0em; }
                                .listprice { font-family: arial,verdana,helvetica,sans-serif; text-decoration: line-through; } 
                                .attention { background-color: #FFFFD5; } 
                                .price { font-family: verdana,arial,helvetica,sans-serif; color: #990000; } 
                                .alertgreen { color: #009900; font-weight: bold; } 
                                .active-nav { background-color: #000000; color: #FFFFFF; } 
                                .inactive-nav { background-color: #FFFFFF; color: #000000; } 
                                .tigerBox .head { border: 1px solid #CCCC99; border-bottom-width: 0px; background-color: #EEEECC; } 
                                .tigerBox .body { border: 1px solid #CCCC99; } 
                                .tigerBoxWithEyebrow .head { border-width: 0px; } 
                                .tigerBoxWithEyebrow .body { border: 1px solid #CCCC99; } 
                                .detailPageTigerBox .head { border-width: 0px; } 
                                .detailPageTigerBox .body { border: 1px solid #CCCC99; } 
                                .detailPageTigerBox .darkCell { background-color: #EEEECC; } 
                                .eyebrow { font-family: verdana,arial,helvetica,sans-serif; font-size: 10px; font-weight: bold; text-transform: uppercase; text-decoration: none; color: #FFFFFF; } 
                                div#page-wrap { min-width: 980px; }
                                div#leftcol, div#leftcolhidden { float: left; width: 180px; margin:5px 0px 0px 5px; display: inline; }
                                 
                                div#rightcol, div#rightcolhidden { float: right; width: 300px; margin-top:5px;}
                                 
                                div#leftcolhidden { clear:left;}
                                div#rightcolhidden { clear:right;}div#center1, div#centercol, div#centerrightspancol { overflow: hidden; }
                                * html div#center1 { width: 100%; }
                                * html div#centercol { width:100%; }
                                * html div#centerrightspancol { width: 100%; }
                                div#page-footer { clear: both; }
                                * html div#page-wrap { border-right: 980px solid #fff; width: 100%; margin-right: 25px;}
                                * html div#content { float: left; position:relative; margin-right: -980px; }
                                a:active { font-family: verdana,arial,helvetica,sans-serif; color: #FF9933; } 
                                a:visited { font-family: verdana,arial,helvetica,sans-serif; color: #996633; } 
                                a:link { font-family: verdana,arial,helvetica,sans-serif; color: #004B91; } 
                                a.noclick, a.noclick:visited { color: #000000; }
                                .noLinkDecoration a { text-decoration: none; border-bottom: none; }
                                .noLinkDecoration a:hover { text-decoration: underline; }
                                .noLinkDecoration a.dynamic:hover { text-decoration: none; border-bottom: 1px dashed; }
                                .noLinkDecoration a.noclick:hover { color: #000000; text-decoration: none; border-bottom: 1px dashed; }
                                 
                                .amabot_right .h1 { color: #E47911; font-size: .92em; } 
                                .amabot_right .amabot_widget .headline, .amabot_left .amabot_widget .headline { color: #E47911; font-size: .92em; display: block; font-weight: bold; } 
                                .amabot_widget .headline { color: #E47911; font-size: medium; display: block; font-weight: bold; } 
                                .amabot_right .amabot_widget { padding-top: 8px;  padding-bottom: 8px; padding-left: 8px;  padding-right: 8px; border-bottom: 1px solid #C9E1F4; border-left: 1px solid #C9E1F4; border-right: 1px solid #C9E1F4; border-top: 1px solid #C9E1F4; } 
                                .amabot_left .h1 { color: #E47911; font-size: .92em; } 
                                .amabot_left .amabot_widget { padding-top: 8px;  padding-bottom: 8px;  padding-left: 8px;  padding-right: 8px; border-bottom: 1px solid #C9E1F4; border-left: 1px solid #C9E1F4; border-right: 1px solid #C9E1F4;  border-top: 1px solid #C9E1F4; }
                                 
                                .amabot_center div.unified_widget, .amabot_center .amabot_widget { font-size: 12px; }
                                .amabot_right div.unified_widget, .amabot_right .amabot_widget { font-size: 12px; }
                                .amabot_left div.unified_widget, .amabot_left .amabot_widget { font-size: 12px; }
                                 
                                .nobullet { list-style-type: none; } 
                                .homepageTitle { font-size: 28pt; font-family: 'Arial Bold', Arial, sans-serif; font-weight: 800; font-variant: normal; color: #80B6CE; line-height:1em; } 
                                .tigerbox { padding-top: 8px;  padding-bottom: 8px;  padding-left: 8px;  padding-right: 8px;  border-bottom: 1px solid #C9E1F4; border-left: 1px solid #C9E1F4;  border-right: 1px solid #C9E1F4;  border-top: 1px solid #C9E1F4; } 
                                .hr-leftbrowse { border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; margin-top: 10px; margin-right: 5px; margin-bottom: 0px; margin-left: 5px; } 
                                div.unified_widget p { margin:0 0 0.5em 0; line-height:1.4em; }
                                 
                                div.unified_widget h2 { color:#E47911; padding:0; }
                                 
                                .amabot_right div.unified_widget .headline, .amabot_left div.unified_widget .headline { color: #E47911; font-size: .92em; display: block; font-weight: bold; }
                                div.unified_widget .headline { color: #E47911; font-size: medium; display: block; font-weight: bold;}
                                div.unified_widget sup { font-weight:normal; font-size: 75%; } 
                                div.unified_widget h2 sup { font-size: 50%; }
                                 
                                td.amabot_left div.unified_widget h2, td.amabot_right div.unified_widget h2, div.amabot_left div.unified_widget h2, div.amabot_right div.unified_widget h2 { font-size:100%; margin:0 0 0.5em 0; } 
                                td.amabot_center div.unified_widget h2, div.amabot_Center div.unified_widget h2 { font-size:135%; font-weight:bold; margin:0 0 0.35em 0px; } 
                                td.amabot_center, div.amabot_center { padding:5px 15px 5px 10px; }
                                div.unified_widget ul { margin: 1em 0; padding: 0 0 0 15px; list-style-position:inside; }
                                 
                                div.unified_widget ol { margin:0; padding:0 0 0 2.5em; }
                                 
                                div.unified_widget a:link, div.unified_widget a:visited { text-decoration:underline; }
                                div.unified_widget a:hover { text-decoration:underline; }
                                div.unified_widget p.seeMore { clear:both; font-family:verdana,arial,helvetica,sans-serif; margin:0; padding-left:1.15em; text-indent: -1.15em; font-size:100%; font-weight:normal; } 
                                div.unified_widget p.seeMore a:link, div.unified_widget p.seeMore a:visited { text-decoration:underline; } 
                                div.unified_widget p.seeMore a:hover { text-decoration: underline; } 
                                div.unified_widget .carat, div.left_nav .carat { font-weight:bold; font-size:120%; font-family:verdana,arial,helvetica,sans-serif; color:#E47911; margin-right:0.20em; } 
                                div.unified_widget a img { border:0; }
                                 
                                div.h_rule { clear:both; } 
                                div#centerrightspancol div.h_rule { clear:right; }
                                div.unified_widget { margin-bottom:2em; clear:both; } 
                                div.unified_widget div.col1 { width: 100%; } 
                                div.unified_widget div.col2 { width: 49%; } 
                                div.unified_widget div.col3 { width: 32%; } 
                                div.unified_widget div.col4 { width: 24%; } 
                                div.unified_widget div.col5 { width: 19%; } 
                                div.unified_widget table { border:0; border-collapse:collapse; width:100%; } 
                                div.unified_widget td { padding:0 8px 8px 0; vertical-align:top; } 
                                div.unified_widget table.col1 td { width:100%; } 
                                div.unified_widget table.col2 td { width:49%; } 
                                div.unified_widget table.col3 td { width:32%; } 
                                div.unified_widget table.col4 td { width:24%; } 
                                div.unified_widget table.col5 td { width:19%; } 
                                div.unified_widget td.bottom { vertical-align:baseline; } 
                                div.unified_widget table h4, div.unified_widget h4 { color:#000; font-size:100%; font-weight:normal; margin:0; padding:0; } 
                                div.rcmBody div.prodImage, amabot_widget div.prodImage {float:left; margin:0px 0.5em 0.25em 0px;}
                                 
                                td.amabot_right div.unified_widget, td.amabot_left div.unified_widget, div.amabot_right div.unified_widget, div.amabot_left div.unified_widget { border:1px solid #C9E1F4; padding:8px; margin-bottom:20px; }
                                 
                                * html td.amabot_right div.unified_widget, * html div.amabot_right div.unified_widget { height:100%; }
                                * html td.amabot_left div.unified_widget, * html div.amabot_left div.unified_widget { height:100%; }
                                 
                                div.rcmBody, amabot_widget div.rcmBody { line-height:1.4em; }
                                div.rcmBody a:link, div.rcmBody a:visited { text-decoration: underline; }
                                 
                                div.rcmBody p.seeMore, amabot_widget div.rcmBody p.seeMore { margin-top:0.5em; }
                                div.rcmBody div.bannerImage { text-align:center; }
                                div.rcmBody h2 span.homepageTitle { display:block; margin-bottom:-0.3em; margin-top:-0.12em; line-height:1em; }
                                div.rcmBody h2 img { float:none; }
                                table.coopTable div.rcmBody .headline { font-size: 110%; }
                                table.coopTable div.rcmBody h2 { font-size: 110%; font-weight:bold; }
                                table.promo div.rcmBody h2 { font-size: 100%; font-weight:bold; }
                                div.blurb div.title { font-weight:bold; padding-top:5px; padding-bottom:2px; }
                                 
                                div.left_nav { font-family: Arial, sans-serif; font-size:100%; margin:0; line-height:1.05em; width:100%; border:1px solid #C9E1F4; padding-bottom:10px; } 
                                div.left_nav h2 { margin:0 0 0 0; color:#000000; font-weight:bold; line-height:1.25em; font-size:100%; font-family:verdana,arial,helvetica,sans-serif; padding: 3px 6px; background-color:#EAF3FE; } 
                                div.left_nav h3 { font-family:verdana,arial,helvetica,sans-serif; margin:0.5em 0 0.4em 0.5em; color:#E47911; font-weight:bold; line-height:1em; font-size:100%; padding-right:0.5em; } 
                                div.left_nav ul { margin:0; padding:0; } 
                                div.left_nav li, div.left_nav p { list-style:none; margin:0.5em 0.5em 0 1em; line-height:1.2em;}
                                 
                                div.left_nav hr { margin:1em 0.5em; border-top:0; border-left:0; border-right:0; border-bottom:1px dashed #cccccc; }
                                 
                                div.left_nav a:link, div.left_nav a:visited { color:#003399; text-decoration:none; font-family:Arial, sans-serif; } 
                                div.left_nav a:hover { color:#2a70fc; text-decoration:underline; } 
                                div.left_nav p.seeMore { padding-left:0.9em; text-indent:-0.9em; margin-top:0.35em; margin-bottom:1em; }
                                 
                                div.left_nav p.seeMore a:link, div.left_nav p.seeMore a:visited { text-decoration:none; } 
                                div.left_nav p.seeMore a:hover { text-decoration:underline; } 
                                div.asinItem { float:left; margin-bottom:1em; width:32%; } 
                                div.asinTextBlock { padding:0 8px 8px 0; } 
                                div.asinItem div.prodImage { height:121px; display:table-cell; vertical-align:bottom; } 
                                div.asinItem div.localImage { display:table-cell; vertical-align:bottom; }
                                 
                                div.asinItem span { margin: 0.5em 0 0.25em 0; } 
                                div.asinItem ul { margin:0; padding:0 0 0.5em 1.3em; text-indent:-1.3em; font-size:90%; }
                                 
                                div.asinTitle {padding-top:3px; padding-bottom:2px;}
                                div.row { clear:both; }
                                body.dp {}
                                body.dp div.h_rule { clear:none; }
                                body.dp div.unified_widget { clear:none; } 
                                div.asinCoop div.asinItem { float:none; width:100%;}
                                div.asinCoop_header {}
                                div.asinCoop_footer {}
                                 
                                div.newAndFuture div.asinItem ul { font-size:100%; }
                                div.newAndFuture div.asinItem li { list-style-position: outside; margin:0 0 0.35em 20px; padding:0; text-indent: 0; }
                                div.newAndFuture h3 { font-size:100%; margin:1em 0 ; }
                                div.newAndFuture a:link, div.newAndFuture a:visited { text-decoration:underline; }
                                div.newAndFuture a:hover { text-decoration:underline; }
                                div.newAndFuture p.seeMore { margin:-0.75em 0 0 35px; }
                                 
                                div.unified_widget ol.topList { margin: 0; padding: 0; list-style: none; }
                                div.unified_widget ol.topList li { list-style: none; clear: both; display: list-item; padding-top: 6px; }
                                div.unified_widget ol.topList .productImage { display: block; float: left;vertical-align: top;text-align: center;width:60px; }
                                div.unified_widget ol.topList .productText { display: block; float: left; padding-left:10px; vertical-align: top; }
                                :root div.unified_widget span.productImage { display: table-cell; float: none; }
                                :root div.unified_widget span.productText { display: table-cell; float: none; }
                                div.unified_widget dl.priceBlock {margin:0 0 0.45em 0;}
                                div.unified_widget dl.priceBlock dt {clear:left; font-weight:bold; float:left; margin:0 0.3em 0 0;}
                                div.unified_widget dl.priceBlock dd {margin:0 0 0.2em 0;}
                                div.unified_widget .bold {font-weight:bold;}
                                div.unified_widget .byline {font-size: 95%; font-weight: normal;}
                                table.thirdLvlNavContent div.blurb {margin:10px;}
                                 
                                div.pageBanner h1 { font-family:Arial, Helvetica, sans-serif; font-weight:normal; font-size:225%; color: #e47911; letter-spacing:-0.03em; margin:0; }
                                div.pageBanner p { font-size:90%; color:#888888; margin: 0; }
                                 
                                div.pageBanner h1.bkgnd { background-repeat:no-repeat; background-color:#FFFFFF; overflow:hidden; text-indent:-100em; }
                                INPUT { font-family: fixed; }
                                 
                                    BODY { background-color: #FFFFFF; font-family: verdana,arial,helvetica,sans-serif; font-size: small; }
                                    TD { font-family: verdana,arial,helvetica,sans-serif; font-size: small; }
                                    TH { font-family: verdana,arial,helvetica,sans-serif; font-size: small; }
                                    .h1 { font-family: verdana,arial,helvetica,sans-serif; color: #E47911; font-size: medium; }
                                    .h3color { font-family: verdana,arial,helvetica,sans-serif; color: #E47911; font-size: small; } 
                                    .tiny { font-family: verdana,arial,helvetica,sans-serif; font-size: x-small; } 
                                    .tinyprice { font-family: verdana,arial,helvetica,sans-serif; color: #990000; font-size: x-small; } 
                                    .highlight { font-family: verdana,arial,helvetica,sans-serif; color: #990000; font-size: small; } 
                                  --></style>
                                 
                                 
                                 
                                 
                                 
                                 
                                  
                                    
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                    
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                    
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                  
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                    
                                 
                                 
                                 
                                 
                                 
                                    
                                 
                                 
                                 
                                 
                                  
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                          <noscript><link type="text/css" rel="stylesheet" href="http://z-ecx.images-amazon.com/images/G/02/x-locale/communities/profile/customer-popover/style-no-js-3._V234365284_.css" /></noscript>
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                <style type="text/css">
                                 
                                 
                                  
                                 
                                 
                                 
                                #importantInfoLightingSlotBucketContent hr {display: none;}
                                  h2 { color: #CC6600; font-size: medium; margin: 0px 0px 0.25em; }
                                 
                                  table.productImageGrid {
                                    float:left;
                                    margin: 0px 15px 15px 0px;
                                    background-color: #FFFFFF;
                                    text-align : center;
                                  }
                                  div.buying table { font-size: small; }
                                 
                                  div.buying table td.tiny { font-size: x-small; }
                                 
                                  #priceBlock, #priceBlock table td, #primaryUsedAndNew, #primaryClubPrice, #secondaryUsedAndNew, #secondaryClubPrice, #adultWarning, #violenceWarning { font-size: small; }
                                  .custImgLink { text-align : center; }
                                  #newAmazonShorts table { font-size: small; }
                                 
                                  #specialOffers table { font-size: small; }
                                 
                                  /* Used Buy Box */
                                 
                                 
                                 
                                  .amabot_endcap .amabot_widget .h1 {color: #000000; font-size: small; }
                                 
                                  .smallFontSize { font-size: small; }
                                 
                                  table.offersAndRebates th { font-size: small; font-weight: bold; text-align: right; padding-left: 8px; }
                                 
                                div.replacementTeaser {
                                  border: 1px solid #136eB4;
                                  background-color: #ffffdd;
                                  margin-left: 295px;
                                  margin-bottom: 5px;
                                  font-size:0.85em;
                                  padding: 3px 4px 4px 4px;
                                }
                                 
                                div.replacementWidget {
                                  margin-left:295px;
                                  margin-right:225px;
                                }
                                 
                                 
                                 
                                 
                                  /* Add to Wish List et al */
                                 
                                 
                                 
                                 
                                    .buyBottomBox { z-index: 1;}
                                    .cBoxInner .GFTButtonCondo {}
                                 
                                    .buyBoxDiv .subsDPTableCenter {
                                      padding: 0px 5px 5px;
                                    }
                                 
                                    .buyBoxDiv .subsDPTableTopRow
                                    {  height: 0px;
                                      line-height: 0px;
                                      font-size: 0px; 
                                    }
                                 
                                    * html .buttonCondoBox {
                                      z-index: 1;
                                    }
                                    
                                    .bc-disabled {
                                      cursor: not-allowed;
                                    }
                                 
                                    .bc-hidden {
                                      display: none;
                                    }
                                 
                                    .tinyGrey {
                                      font-family: verdana,arial,helvetica,sans-serif;
                                      font-size: xx-small;
                                      color:#808080;
                                    }
                                    .wl-pop-unsprited .wl-pop-body .wl-pop-left { background-image: url(http://g-ecx.images-amazon.com/images/G/02/gifts/registries/wishlist/eq/wladd_drop_left._V232086925_.png); }
                                    .wl-pop-unsprited .wl-pop-body .wl-pop-right { background-image: url(http://g-ecx.images-amazon.com/images/G/02/gifts/registries/wishlist/eq/wladd_drop_right._V232086925_.png); }
                                    .wl-pop-unsprited .wl-pop-header .wl-pop-left { background-image: url(http://g-ecx.images-amazon.com/images/G/02/gifts/registries/wishlist/eq/wladd_drop_topleft._V232086925_.png); }
                                    .wl-pop-unsprited .wl-pop-header .wl-pop-right { background-image: url(http://g-ecx.images-amazon.com/images/G/02/gifts/registries/wishlist/eq/wladd_drop_topright._V232086925_.png); }
                                    .wl-pop-unsprited .wl-pop-header .wl-pop-middle { background-image: url(http://g-ecx.images-amazon.com/images/G/02/gifts/registries/wishlist/eq/wladd_drop_top._V232086927_.png); }
                                    .wl-pop-unsprited .wl-pop-footer .wl-pop-left { background-image: url(http://g-ecx.images-amazon.com/images/G/02/gifts/registries/wishlist/eq/wladd_drop_bottomleft._V232086925_.png); }
                                    .wl-pop-unsprited .wl-pop-footer .wl-pop-right { background-image: url(http://g-ecx.images-amazon.com/images/G/02/gifts/registries/wishlist/eq/wladd_drop_bottomright._V232086924_.png); }
                                    .wl-pop-unsprited .wl-pop-footer .wl-pop-middle { background-image: url(http://g-ecx.images-amazon.com/images/G/02/gifts/registries/wishlist/eq/wladd_drop_bottom._V156433860_.png); }
                                 
                                    .wl-pop-sprited .wl-pop-body .wl-pop-left,
                                    .wl-pop-sprited .wl-pop-body .wl-pop-right {
                                    }
                                 
                                    .wl-pop-sprited .wl-pop-header .wl-pop-left,
                                    .wl-pop-sprited .wl-pop-header .wl-pop-right,
                                    .wl-pop-sprited .wl-pop-header .wl-pop-middle,
                                    .wl-pop-sprited .wl-pop-footer .wl-pop-left,
                                    .wl-pop-sprited .wl-pop-footer .wl-pop-right,
                                    .wl-pop-sprited .wl-pop-footer .wl-pop-middle {
                                    }
                                 
                                    .wl-pop-hide {
                                      display: none;
                                    }
                                    
                                    .wl-pop-body {
                                      height: 100%;
                                      position: relative;
                                    }
                                 
                                    .wl-pop-body .wl-pop-left {
                                      background-attachment: scroll;
                                      background-repeat: repeat-y;
                                      height: 100%;
                                      left: 0;
                                      position: absolute;
                                      top: 0;
                                      width: 5px;
                                    }
                                 
                                    .wl-pop-sprited .wl-pop-body .wl-pop-left {
                                      background-position: 0 top;
                                    }
                                 
                                    .wl-pop-sprited .wl-pop-body .wl-pop-right {
                                      background-position: -5px top;
                                    }
                                 
                                    .wl-pop-body .wl-pop-right {
                                      background-attachment: scroll;
                                      background-repeat: repeat-y;
                                      height: 100%;
                                      position: absolute;
                                      right: 0;
                                      top: 0;
                                      width: 5px;
                                    }
                                 
                                    .wl-pop-header, .wl-pop-footer {
                                      font-size: 0;
                                      line-height: 0;
                                      position: relative;
                                      width: 100%;
                                      overflow: hidden;
                                    }
                                 
                                    .wl-pop-footer * {
                                      height: 8px;
                                    }
                                 
                                    .wl-pop-header * {
                                      height: 4px;
                                    }
                                 
                                    .wl-pop-header .wl-pop-left {
                                      background-attachment: scroll;
                                      background-repeat: no-repeat;
                                      left: 0;
                                      position: absolute;
                                      top: 0;
                                      width: 8px;
                                    }
                                 
                                    .wl-pop-sprited .wl-pop-header .wl-pop-left { background-position: 0 -10px; }
                                 
                                    .wl-pop-header .wl-pop-right {
                                      background-attachment: scroll;
                                      background-repeat: no-repeat;
                                      position: absolute;
                                      right: 0;
                                      top: 0;
                                      width: 8px;
                                    }
                                 
                                    .wl-pop-sprited .wl-pop-header .wl-pop-right { background-position: -10px -10px; }
                                 
                                    .wl-pop-header .wl-pop-middle, .wl-pop-footer .wl-pop-middle {
                                      background-attachment: scroll;
                                      background-repeat: repeat-x;
                                      margin-right: 8px;
                                      margin-left: 8px;
                                    }
                                 
                                    .wl-pop-sprited .wl-pop-header .wl-pop-middle { background-position: 0 0; }
                                 
                                    .wl-pop-footer .wl-pop-left {
                                      background-attachment: scroll;
                                      background-repeat: no-repeat;
                                      left: 0;
                                      position: absolute;
                                      top: 0;
                                      width: 8px;
                                    }
                                 
                                    .wl-pop-sprited .wl-pop-footer .wl-pop-left { background-position: 0 -20px; }
                                 
                                    .wl-pop-footer .wl-pop-right {
                                      background-attachment: scroll;
                                      background-repeat: no-repeat;
                                      position: absolute;
                                      right: 0;
                                      top: 0;
                                      width: 8px;
                                    }
                                 
                                    .wl-pop-sprited .wl-pop-footer .wl-pop-right { background-position: -10px -20px; }
                                 
                                    .wl-pop-sprited .wl-pop-footer .wl-pop-middle { background-position: 0 -30px;}
                                 
                                    .wl-pop-wrapper {
                                      left: 5px;
                                      max-height: 191px;
                                      overflow-x: hidden;
                                      overflow-y: auto;
                                      position: relative;
                                      width: 160px;
                                    }
                                 
                                    * html .wl-pop-wrapper {
                                      height: expression( this.scrollHeight > 183 ? "184px" : "auto" );
                                      max-height: 184px;
                                    }
                                 
                                    .wl-pop-wrapper form {
                                      display: inline;
                                    }
                                 
                                    .wl-pop-wrapper a.wl-list-link, .wl-pop-wrapper a.wl-create-link {
                                      cursor: pointer;
                                      display: block;
                                      outline: none;
                                      text-decoration: none;
                                      width: 160px;
                                    }
                                 
                                    .wl-pop-wrapper a.wl-create-link {
                                      background-color: #e5e5c1;
                                    }
                                 
                                    .wl-pop-wrapper a.wl-list-link:hover, .wl-pop-wrapper a.wl-create-link:hover {
                                      background-color: #ffffff;
                                      background-image: none;
                                    }
                                 
                                    .wl-list-button, .wl-list-button-last, .wl-create-button, .wl-create-button-last {
                                      font-family: "arial";
                                      height: 23px;
                                      overflow: hidden;
                                      line-height: 23px;
                                      width: 160px;
                                    }
                                 
                                    .wl-create-button {
                                      border-color: #9d9d74;
                                      border-style: solid;
                                      border-width: 0 0 1px 0;
                                    }
                                 
                                    .wl-list-button {
                                      border-color: #9d9d74;
                                      border-style: solid;
                                      border-width: 0 0 1px 0;
                                    }
                                 
                                    .wl-list-button-last {
                                      border-color: #79784a;
                                      border-style: solid;
                                      border-width: 0 0 1px 0;
                                    }
                                 
                                    .wl-list-inner, .wl-create-inner {
                                      border-style: solid;
                                      border-width: 1px 0 0 1px;
                                    }
                                 
                                    .wl-list-inner {
                                      border-color: #ffffff;
                                    }
                                 
                                    .wl-create-inner {
                                      border-color: #f4f4e1;
                                    }
                                 
                                    .wl-list-type, .wl-list-type-break {
                                      color: #9d9d74;
                                      float: right;
                                      font-size: 9px;
                                      margin-right: 2px;
                                      max-height: 20px;
                                      overflow: hidden;
                                      text-align: right;
                                    }
                                 
                                    .wl-list-type-break {
                                      line-height: 9px;
                                      margin-top: 2px;
                                    }
                                 
                                    .wl-list-name-wrapper {
                                      height: 23px;
                                      margin-left: 2px;
                                      overflow: hidden;
                                      white-space: nowrap;
                                      width: 75px;
                                      display: inline;
                                    }
                                 
                                    .wl-list-name {
                                      color: #004b91;
                                      font-size: 10px;
                                      margin-left: 3px;
                                    }
                                 
                                    .wl-list-default {
                                      color: #004b91;
                                      font-size: 10px;
                                    }
                                 
                                    .wl-create-text {
                                      color: #004b91;
                                      font-size: 10px;
                                      margin-left: 3px;
                                    }
                                 
                                    .s_add2WishListRight, .s_add2WishListLeft {
                                      -webkit-appearance: none;
                                      -webkit-border-radius: 0;
                                    }
                                 
                                 
                                    
                                 
                                 
                                #obsims .content  { margin-left: 5px; }
                                #obsims .faceout     { padding: 0; }
                                #obsims .faceout img, #obsims img.faceout { margin-right: 10px; }
                                #obsims .asinDetails { padding: 0; font-size:10px; }
                                #obsims .asinList    { margin-top: 0; }
                                #obsims .vtp-clear   { height: 5px; line-height: 50%; }
                                #obsims .simFooter   { margin-left: 0; }
                                 
                                #ob-replacement_feature_div { zoom: 1 !important; }
                                 
                                div.nvff_radio       { margin-bottom: 10px; }
                                div.nvff_radio label { margin-bottom: 1em; }
                                div.nvff_highlight   { font-size:0.9em; margin-top:8px; margin-bottom:10px; padding:7px; border:1px solid #DDDAC0; background:#FFFFDD; }
                                div.nvff_help        { color:#000000; }
                                div.nvff_error       { color:#990000; }
                                div.nvffGrey         { margin-top:5px; font-size:.85em; color:#66666B; }
                                div.nvffGreen        { margin-top:5px; font-size:.85em; color:#090; }
                                div.nvffRed          { margin-top:5px; font-size:.85em; color:#990000; }
                                #nvFeedbackForm      { margin-bottom:0px; }
                                #nvOtherText         { border:1px solid #AED2EE; color:#999999; margin-top: 2px; }
                                 
                                 
                                  table.buyBox .eq td.bottomLeft table {
                                      padding-left: 22px;
                                      padding-right: 10px;
                                      padding-top: 4px;
                                      padding-bottom: 6px;
                                  }
                                  table.buyBox .eq td.bottomLeft {
                                      background-repeat: no-repeat;
                                      background-position: left bottom;
                                  }
                                  table.buyBox .eq td.bottomRight {
                                      background-repeat: no-repeat;
                                      background-position: right bottom;
                                  }
                                  table.buyBox .eq td.topLeft {
                                      background-repeat: no-repeat;
                                      background-position: left top;
                                  }
                                  table.buyBox .eq td.topRight {
                                      background-repeat: no-repeat;
                                      background-position: right top;
                                  }
                                  table.buyBox div.eqspacer {
                                      padding-top: 8px;
                                  }
                                  table.buyBox td.topLeft {
                                    background-repeat: no-repeat;
                                    background-position: top left;
                                    padding-top: 12px;
                                    padding-left: 12px;
                                  }
                                  table.buyBox td.topRight {
                                    background-repeat: no-repeat;
                                    background-position: top right;
                                  }
                                  table.buyBox td.bottomLeft {
                                    background-repeat: no-repeat;
                                    background-position: bottom left;
                                    font-size: 4px;
                                  }
                                  table.buyBox td.bottomRight {
                                    background-repeat: no-repeat;
                                    background-position: bottom right;
                                    font-size: 4px;
                                  }
                                 
                                .bb_exp_co_softlines {
                                        display:none !important;
                                }
                                 
                                 
                                  .extendedBuybox b.price { font-size: .86em; }
                                  .extendedBuybox { width: 100%; }
                                  div.extendedBuyBox { padding: 4px 0px; }  
                                  hr.EBBdivider { margin: 0px; }
                                 
                                .buyTopBox .cBoxTL, .buyTopBox .cBoxTR, .buyTopBox .cBoxBL, .buyTopBox .cBoxBR,
                                .buyBottomBox .cBoxTL, .buyBottomBox .cBoxTR, .buyBottomBox .cBoxBL, .buyBottomBox .cBoxBR,
                                .mbcBox .cBoxTL, .mbcBox .cBoxTR, .mbcBox .cBoxBL, .mbcBox .cBoxBR,
                                .addonBox .cBoxTL, .addonBox .cBoxTR { 
                                  background-repeat:no-repeat; 
                                }
                                 
                                .addonBox .cBoxTL { background-position: 0px -180px; }
                                .addonBox .cBoxTR { background-position: -10px -180px; }
                                 
                                .mbcBox .cBoxTL { background-position: 0px -140px; }
                                .mbcBox .cBoxTR { background-position: -10px -140px; }
                                .mbcBox .cBoxBL { background-position: 0px -150px; }
                                .mbcBox .cBoxBR { background-position: -10px -150px; }
                                .mbcBox .cBoxR, .mbcBox .cBoxB { background-color: #6daee1; }
                                .mbcBox {
                                  border:1px solid #6daee1; 
                                  border-right: none; 
                                  border-bottom: none; 
                                  background-color: #fff;
                                  margin-bottom: 0;
                                  z-index: 0;
                                }
                                .buyTopBox .cBoxTL { background-position: 0px -20px; }
                                .buyTopBox .cBoxTR { background-position: -10px -20px; }
                                .buyTopBox .cBoxBL { background-position: 0px -30px; }
                                .buyTopBox .cBoxBR { background-position: -10px -30px; }
                                .buyTopBox .cBoxR, .buyTopBox .cBoxB { background-color: #6daee1; }
                                .buyTopBox { 
                                  margin-bottom: 0; 
                                  border:1px solid #6daee1; 
                                  border-right: none; 
                                  border-bottom: none; 
                                  background-color: #c0dbf2; 
                                }
                                .buyBottomBox .cBoxTL { background-position: 0px -120px; }
                                .buyBottomBox .cBoxTR { background-position: -10px -120px; }
                                .buyBottomBox .cBoxBL { background-position: 0px -130px; }
                                .buyBottomBox .cBoxBR { background-position: -10px -130px; }
                                .buyBottomBox .cBoxR, .buyBottomBox .cBoxB { background-color: #6daee1; }
                                .buyBottomBox .cBoxInner { padding-top: 4px; padding-bottom: 6px; }
                                .buyBottomBox { 
                                  margin-top: 0;
                                  margin-bottom: 0;
                                  border:1px solid #6daee1; 
                                  border-right: none; 
                                  border-top: none; 
                                  border-bottom: none; 
                                  background-color: #ebf3fe;
                                }
                                  .s_bbAdd2Cart {
                                   }
                                div.mbcContainer { font-size:0.86em; }
                                div.mbcContainer div.mbcTitle, div.emwaTitle {
                                  background-color:#D6E7F8;
                                  font-size:11px;
                                  font-weight:bold;
                                  padding:4px 0 5px;
                                  text-align: center;
                                }
                                table.mbcOffers, table.mbcOfferRow {
                                  border:none;
                                  padding:0px; 
                                  width:100%;  
                                }
                                table.mbcOffers tr.mbcOfferRowSelect td, 
                                table.mbcOffers tr.mbcPopoverOfferRowSelect td {
                                  background-color: #FCFCC2;
                                  cursor: hand;
                                  cursor: pointer;
                                }
                                table.mbcOffers tr td.mbcOfferRowTD { padding:0px 10px; }
                                table.mbcOfferRow tr td.mbcPriceCell {
                                  color:#990000;
                                  border-bottom: 1px dotted #D6D6D6;
                                  padding-bottom:5px;
                                }
                                table.mbcOfferRow tr.mbcMerch td { 
                                  padding:5px 1px 0px 0px;
                                }
                                table.mbcOfferRow tr td {
                                  font-size:12px;
                                  font-family:Arial,Helvetica,Geneva,sans-serif;
                                }
                                *html div.mbcTradeIn{
                                  width:215px;
                                }
                                div.mbcOlp {
                                  padding: 5px 10px 0px 10px;
                                }
                                div.mbcOlpLink {
                                  font-size: 11px;
                                  border-bottom: 1px dotted #D6D6D6;
                                  padding-bottom: 5px;
                                }
                                .mbcPopoverContainer, 
                                .mbcPopoverContainer a, 
                                .mbcPopoverContainer a:visited, 
                                .mbcPopoverContainer a:active {
                                  font-family:Arial,Verdana,Helvetica,sans-serif;
                                  font-size:11px;
                                }
                                #mbcPPUText .pricePerUnit { white-space: normal; }
                                 
                                #sitb-pop {
                                z-index:1999; 
                                display: none;
                                }
                                 
                                #sitb-pop table.sitb-pop-contentsTable {
                                  width:100%;
                                  border:0;
                                  cellpadding:1;
                                  cellspacing:0;
                                }
                                 
                                #sitb-pop .sitb-pop-bookmarks {
                                line-height:21px;
                                color:#DDDAC0;
                                font-size:11px;
                                width: 302px;
                                }
                                 
                                #sitb-pop .sitb-pop-bookmarks a {
                                font-family:Verdana;
                                font-weight:bold;
                                white-space:nowrap;
                                color:#004B91;
                                font-size:11px;
                                        text-decoration:none;
                                }
                                 
                                #sitb-pop .sitb-pop-bookmarks a:Hover { color:#004B91; text-decoration:none; border-bottom:1px dashed; }
                                #sitb-pop .sitb-pop-bookmarks a:Active { color:#F93; text-decoration:none; border-bottom:1px dashed; }
                                #sitb-pop .sitb-pop-bookmarks a:Visited { color:#963; }
                                 
                                #sitb-pop .sitb-pop-search {
                                font-family: Verdana;
                                font-size:11px;
                                margin-top: 5px;
                                width: 302px;
                                }
                                 
                                #sitb-pop .sitb-pop-inputbox {
                                width: 126px;
                                }
                                .tinypopup {
                                font-family: Verdana, Arial, Helvetica, sans-serif;
                                font-size: 11px;
                                color: #333333;
                                }
                                 
                                #sitb-body-gobutton {
                                    position: absolute;
                                    padding-left: 5px;
                                }
                                 
                                .bortfont {
                                  font-size: 0.85em;
                                }
                                 
                                td.bortArrowCell {
                                  width: 25px;
                                  padding-top: 50px;
                                  vertical
                      • 8. Re: How to parse out the Publisher from a text string
                        philmodjunk

                             The word "publisher" does not ocurr anywhere in the text that you posted here.

                        • 9. Re: How to parse out the Publisher from a text string
                          PeterMontague

                               Well that would explain why it's not working. I'll have to analyse it more closely over the weekend. Have a great one!

                          • 10. Re: How to parse out the Publisher from a text string
                            PeterMontague

                                 OK I get what happened. It wouldn't let me add all of the text - there is a huge amount of it.

                                 Its the source code of this url: 

                                 http://www.amazon.co.uk/VueScan-Bible-Everything-Perfect-Scanning/dp/1933952695/ref=sr_1_1?s=books&ie=UTF8&qid=1349638271&sr=1-1

                            • 11. Re: How to parse out the Publisher from a text string
                              philmodjunk

                                   The calc fails because the delimitting characters, the left parenthesis and the semi colon occur earlier in this mass of text. A small adjustment can allow for this and then if works:

                                   Let ( [ T =Child::Source ;
                                             start = Position ( T ; "<li><b>Publisher:</b>" ; 1 ; 1 ) + 22 ;
                                             endParen = Position ( T ; "(" ; start ; 1 );
                                             endSemi = Position ( T ; ";" ; start ; 1 ) ;
                                             end = If ( endSemi ; EndSemi ; endParen )
                                           ] ;
                                           Trim ( Middle ( T ; start ; end - start ) )
                                         // List ( start ; endParen ; endSemi ; end )
                                         )

                                   This way, the calculation looks for the first occurrence of these characters to occur after the start text.

                              • 12. Re: How to parse out the Publisher from a text string
                                PeterMontague

                                     Thanks Phil

                                     That did the trick for me. Its working like a dream now.

                                • 13. Re: How to parse out the Publisher from a text string
                                  PeterMontague

                                       That was working for a while. But I think they changed the format of the html code because I'm not getting the results I was getting before. Now the result I get starts with the publisher and then includes the rest of the source code from that point. Here is an example of a page that has the source code which I think has changed: http://www.amazon.co.uk/gp/aw/d/0749386533/ref=is_a_0749386533

                                        

                                  • 14. Re: How to parse out the Publisher from a text string
                                    philmodjunk

                                         One of the headaches you get with parsing text from a web site is that they can change the content and its format at any time.

                                         I used FireFox to view the page source and did a find for publisher and came up with no such text in the page source. That is consistent with what I see in the displayed page as it doesn't list a publisher either. Looks like we need this calc to return null if there is no publisher to parse from the text.

                                         Let ( [ T =Child::Source ;
                                                   start = Position ( T ; "<li><b>Publisher:</b>" ; 1 ; 1 ) + 22 ;
                                                   endParen = Position ( T ; "(" ; start ; 1 );
                                                   endSemi = Position ( T ; ";" ; start ; 1 ) ;
                                                   end = If ( endSemi ; EndSemi ; endParen )
                                                 ] ;
                                                 If ( start ; Trim ( Middle ( T ; start ; end - start ) ) )
                                               )

                                         BTW,      // List ( start ; endParen ; endSemi ; end ) was accidentally included in an earlier post. I test a lot of these using FileMaker Advanced's Data Viewer and this line was a debugging line I used to check the values produced by the Let variables. It was disableed by the // so it did no harm, but is not needed as part of the working calculation.

                                    1 2 Previous Next