title: Retrive the Url from an Html Img Tag
body: <p><strong>BackGround Info</strong></p>
  
  <p>Currently working on a C# web api that will be returning selected Img url's as base64.  I currently have the functionality that would preform the base64 conversion however, I am getting a large amount of text which also include Img Url's which I will need to crop out of the string and give it to my function to convert the img to base 64.  I read up on an lib.("HtmlAgilityPack;") that should make this task easy but when I am use it I get "HtmlDocument.cs" not found.  However, I am not submitting a document, but sending it a string which is HTML.  I read the doc and it is suppose to work with a string as well, but it is not working for me.  This is the code using "HtmlAgilityPack".</p>
  
  <p><strong>NON WORKING CODE</strong></p>
  
  <pre><code>foreach(var item in returnList)
                      {
                           if (item.Content.Contains("~~/picture~~"))
                          {
                              HtmlDocument doc = new HtmlDocument();
                              doc.Load(item.Content);
  </code></pre>
  
  <p><strong>Error Message From HtmlAgilityPack</strong></p>
  
  <p><a href="https://i.stack.imgur.com/RJWWE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RJWWE.png" alt="enter image description here"></a></p>
  
  <p><strong>Question</strong>
  I am receiving a string which is Html from SharePoint.  This Html string may be tokenized with heading tokens and/or picture tokens.  I am trying to isolate the retrieve the html from the img src Hmtl tag.  I understand that regex may be impractical, but I would consider working with a regex expressions is it available to retrieve the url from img src.  </p>
  
  <p><strong>Sample String</strong></p>
  
  <pre><code>Bullet~~Increased Cash Flow&lt;/li&gt;&lt;li&gt;~~/Document Text Bullet~~Tax Efficient Organizational Structures&lt;/li&gt;&lt;li&gt;~~/Document Text Bullet~~Tax Strategies that Closely Align with Business Strategies&lt;/li&gt;&lt;li&gt;~~/Document Text Bullet~~Complete Knowledge of State and Local Tax Obligations&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;~~/Document Heading 2~~is the firm of choice&lt;/p&gt;&lt;p&gt;~~/Document Text~~When it comes to accounting and advisory services is the unique firm of choice. As a trusted advisor to our clients, we bring an integrated client service approach with dedicated industry experience. Dixon Hughes Goodman respects the value of every client relationship and provides clients throughout the U.S. with an unwavering commitment to hands-on, personal attention from our partners and senior-level professionals.&lt;/p&gt;&lt;p&gt;~~/Document Text~~of choice for clients in search of a trusted advisor to deal with their state and local tax needs. Through our leading best practices and experience, our SALT professionals offer quality and ease to the client engagement. We are proud to provide highly comprehensive services.&lt;/p&gt;
  
      &lt;p&gt;~~/picture~~&lt;br&gt;&lt;/p&gt;&lt;p&gt; 
            &lt;img src="/sites/ContentCenter/Graphics/map-al.jpg" alt="map al" style="width&amp;#58;611px;height&amp;#58;262px;" /&gt;&amp;#160;
      &lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;
      ~~/picture~~&lt;br&gt;&lt;/p&gt;&lt;p&gt;
            &lt;img src="/sites/ContentCenter/Graphics/Firm_Telescope_Illustration.jpg" alt="Firm_Telescope_Illustration.jpg" style="margin&amp;#58;5px;width&amp;#58;155px;height&amp;#58;155px;" /&gt;    &lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;div class="ExternalClassAF0833CB235F437993D7BEE362A1A88A"&gt;&lt;br&gt;&lt;/div&gt;&lt;div class="ExternalClassAF0833CB235F437993D7BEE362A1A88A"&gt;&lt;br&gt;&lt;/div&gt;&lt;div class="ExternalClassAF0833CB235F437993D7BEE362A1A88A"&gt;&lt;br&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>Important</strong></p>
  
  <p>I am working with an HTML string, not a file.</p>