title: preg_match_all to find url in string
body: <p>I get may Data from XML file. I need to Output only the URL´s from the Strings in my array. In format like 'https://d1.cloudfront.net/00722.jpg' without the other tags and styles arround. I have try that with preg_match_all but i get no results.
  What i doing wrong?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>public function xmlParserPICtn():string
  {
      
      $valuesPICtn = $this-&gt;xml-&gt;xpath("//OBJEKT[@ID='91727']//PICTURE"); 
      $searchpattern="@SRC=(.*)width@";
      preg_match_all($searchpattern, $valuesPICtn, $valuesPICt); //Search-String
      foreach ($valuesPICt as $PICelements) 
        {
           $display .= '&lt;li&gt;';
           $display .= ''.$PICelements-&gt;PIC.'';
           $display .= '&lt;/li&gt;';
              
          }
       $display .= '';
  
        return $display;
    }
    
    
    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;OBJEKT ID="91727"&gt;
      
            &lt;PICTURE ID="7"&gt;
                &lt;ID&gt;7&lt;/ID&gt;
                    &lt;PIC&gt;&amp;lt;IMG SRC="https://d1.cloudfront.net/00722.jpg" width="610" height="480" BORDER=0&gt;&lt;/PIC&gt;
                   &lt;/PICTURE&gt;
      
           &lt;PICTURE ID="11"&gt;
                &lt;ID&gt;11&lt;/ID&gt;
                    &lt;PIC&gt;&amp;lt;IMG SRC="https://d1.cloudfront.net/01123.jpg" width="630" height="480" BORDER=0&gt;&lt;/PIC&gt;
                   &lt;/PICTURE&gt;
      
           &lt;PICTURE ID="2"&gt;
                    &lt;ID&gt;2&lt;/ID&gt;
                    &lt;PIC&gt;&amp;lt;IMG SRC="https://d1.cloudfront.net/00224.jpg" width="740" height="480" BORDER=0&gt;&lt;/PIC&gt;
                   &lt;/PICTURE&gt;
      
           &lt;PICTURE ID="9"&gt;
                    &lt;ID&gt;9&lt;/ID&gt;
                    &lt;PIC&gt;&amp;lt;IMG SRC="https://d1.cloudfront.net/00925.jpg" width="940" height="480" BORDER=0&gt;&lt;/PIC&gt;
                   &lt;/PICTURE&gt;
      
  &lt;/OBJEKT&gt;</code></pre>
  </div>
  </div>
  </p>