title: How to select all non-empty anchor links with a CSS selector?
body: <p>Hey there I am searching for a CSS selector to select all non-empty anchor links, where the anchor itself is not empty. </p>
  
  <p>I already have a selector in order to select all links having an anchor attribute - see this example:</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-css lang-css prettyprint-override"><code>a[href*=\#] {
    background-color:#f00;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="sample"&gt;
  &lt;p&gt;
  Hey bro, yesterday I was walking about 50 
  &lt;a href="http://www.example.com"&gt;example&lt;/a&gt; 
  kilometers down this shiny road. 
  After watching &lt;a href="#friends"&gt;my friends&lt;/a&gt; smoking a 
  &lt;a href="#"&gt;shiny cigarette&lt;/a&gt; the air became dark 
  &lt;a href="http://example.com/#"&gt;and&lt;/a&gt;
   my fancyness 
  &lt;a href="http://www.example.com/#inc"&gt;increased&lt;/a&gt;.
  &lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>However what I want is to select all anchors with href="#something", while excluding all anchors where <code>href="whatever#"</code>. </p>
  
  <p>Such that "shiny cigarette" and "and" would not be selected.</p>
  
  <p>May you help me out on this?</p>