AngularJS ngBindHtml with filter.
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.1/angular-sanitize.min.js"></script>
<div ng-app="myApp" ng-controller="MainCtrl">
<div>Here is the extracted data <{{data | extractSrcUrl}}</div>
<div ng-bind-html="data | extractSrcUrl"></div>
<div>Below is the original data</div>
<div ng-bind-html="data"></div>
</div>
JavaScript
var app = angular.module('myApp', ['ngSanitize']);
app.controller('MainCtrl', function ($scope) {
$scope.data = '<img src="http://o.aolcdn.com/hss/storage/midas/37c38989a5f26031be3e0ec5ffc5cd2/200012386/got-hbo-go-crash-2014-04-07-01_thumbnail.jpg"/> Viewing of the Game of Thrones season debut came to a crashing halt yesterday thanks to server problems with HBO Go. The cable outfit first reported the problem late yesterday via Twitter, and finally restored full service early this morning. That...';
});
app.filter('extractSrcUrl', function () {
return function (text) {
var regex = new RegExp("<img.+?src=[\"'](.+?)[\"'].*?>", "gm")
var arr = text.match(regex);
return(arr[0]);
}
});