title: How can I parse Google Page Insights output?
body: <p>Using <a href="https://developers.google.com/speed/docs/insights/v2/first-app" rel="nofollow noreferrer">PageInsights API</a> this is a sample of array I get. How can I replace those things in braces with a link? Do I need to use some complex regular expressions or is there a simpler way?</p>
  
  <pre><code>array (size=2)
    'format' =&gt; string 'Your page has no redirects. Learn more about {{BEGIN_LINK}}avoiding landing page redirects{{END_LINK}}.' (length=103)
    'args' =&gt; 
      array (size=1)
        0 =&gt; 
          array (size=3)
            'type' =&gt; string 'HYPERLINK' (length=9)
            'key' =&gt; string 'LINK' (length=4)
            'value' =&gt; string 'https://developers.google.com/speed/docs/insights/AvoidRedirects' (length=64)
  </code></pre>