title: Regex to get scriptfunction body
body: <p>I have a document and will need the function body in this document</p>
  
  <p>This is a piece of the document</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    //&lt;![CDATA[
    (function(){
      var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },
      b = function(b, c) {a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)};
      b(function(){
        var a = document.getElementById('cf-content');a.style.display = 'block';
        setTimeout(function(){
          var t,r,a,f, vsFCUji={"GqfTZuOkv":+((!+[]+!![]+!![]+[])+(+[]))};
          t = document.createElement('div');
          t.innerHTML="&lt;a href='/'&gt;x&lt;/a&gt;";
          t = t.firstChild.href;r = t.match(/https?:\/\//)[0];
          t = t.substr(r.length); t = t.substr(0,t.length-1);
          a = document.getElementById('jschl-answer');
          f = document.getElementById('challenge-form');
          ;vsFCUji.GqfTZuOkv+=+((+!![]+[])+(!+[]+!![]+!![]));vsFCUji.GqfTZuOkv+=!+[]+!![]+!![];vsFCUji.GqfTZuOkv+=+((+!![]+[])+(+[]));vsFCUji.GqfTZuOkv+=+((!+[]+!![]+!![]+!![]+[])+(+[]));vsFCUji.GqfTZuOkv-=+((!+[]+!![]+[])+(+[]));a.value = parseInt(vsFCUji.GqfTZuOkv, 10) + t.length;
          f.submit();
        }, 4000);
      }, false);
    })();
    //]]&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>And this is what i need as result from the <code>setTimeout(function(){</code> :</p>
  
  <pre><code>+((!+[]+!![]+!![]+[])+(+[]))
  </code></pre>
  
  <p>I will use this command to get the document</p>
  
  <pre><code>Document document = Jsoup.connect(encoded_url).timeout(10000).userAgent("Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.3; Trident/7.0;  rv:11.0) like Gecko").method(Connection.Method.GET).get();
  </code></pre>
  
  <p>Then i run this command to get the function body from the document.</p>
  
  <pre><code>Pattern pattern_1 = Pattern.compile("setTimeout\\(function\\(\\)\\{\s*.*?.*:(.*?)};");                 
  Matcher m = pattern_1.matcher(document.html());
  Log.d("Matcher", "output:" + m.matches());
  </code></pre>
  
  <p>But it gives nothing...</p>