var str = '<strong class="ng-binding">to</strong> : "2016-08-05T11:31:42.771Z" next text t.p...'; alert(str.match(/\d[\s\S]+?(?=[ZT])/g))