(function(env) {
    env.ddg_spice_expatistan = function(api_result) {
        "use strict";

        if(!api_result || api_result.status !== 'OK') {
            return Spice.failed('expatistan');
        }

        Spice.add({
            id: "expatistan",
            name: "Answer",
            data: api_result,
            meta: {
                sourceUrl: api_result.source_url,
                sourceName: 'Expatistan'
            },
            normalize: function(item) {
                // Split abstract in order to get
                // two separate strings and modify the first
                if (!api_result.abstract) {
                    return null;
                }

                var lines = api_result.abstract.split(/of\s[0-9]+\s/);
                var cost = api_result.abstract.match(/\s[0-9]+\s/);

              
                var firstLine = '';
                var secondLine = '';
                
                if (lines.length === 2 && cost.length >= 1) {
                    firstLine = lines[0].replace(' has a', '') + ' =' + cost[0];
                    secondLine = lines[1];
                }              

                if(!cost) firstLine = lines[0].replace(/\./, "");   
                
                return {
                    title: DDG.strip_html(firstLine),
                    subtitle: DDG.strip_html(secondLine)
                };
            },
            templates: {
                group: 'text',
                options: {
                    moreAt: true
                }
            }
        });
    }
}(this));

(function(env) {
    env.ddg_spice_expatistan = function(api_result) {
        "use strict";

        if(!api_result || api_result.status !== 'OK') {
            return Spice.failed('expatistan');
        }

        Spice.add({
            id: "expatistan",
            name: "Answer",
            data: api_result,
            meta: {
                sourceUrl: api_result.source_url,
                sourceName: 'Expatistan'
            },
            normalize: function(item) {
                // Split abstract in order to get
                // two separate strings and modify the first
                if (!api_result.abstract) {
                    return null;
                }

                var lines = api_result.abstract.split(/of\s[0-9]+\s/);
                var cost = api_result.abstract.match(/\s[0-9]+\s/);

              
                var firstLine = '';
                var secondLine = '';
                
                if (lines.length === 2 && cost.length >= 1) {
                    firstLine = lines[0].replace(' has a', '') + ' =' + cost[0];
                    secondLine = lines[1];
                }              

                if(!cost) firstLine = api_result.abstract.replace(/\./, "");   
                
                return {
                    title: DDG.strip_html(firstLine),
                    subtitle: DDG.strip_html(secondLine)
                };
            },
            templates: {
                group: 'text',
                options: {
                    moreAt: true
                }
            }
        });
    }
}(this));

Switch to using the api_result.abstract for firstline
Expatistan: Switch to using the api_result.abstract for firstline
