title: Drupal 8 - Get All Nodes With a Part of Url Alias
body: <p>I try to find a way to get all nodes by a part of the url alias in the nodes. I know i get a specific node by the complete url alias. For example:</p>
  <pre><code>$path = \Drupal::service('path.alias_manager')-&gt;getPathByAlias('/this-is-the-alias');
  if(preg_match('/node\/(\d+)/', $path, $matches)) {
      $node = \Drupal\node\Entity\Node::load($matches[1]);
  }
  </code></pre>
  <p>And I know I can find multiple nodes by entity query:</p>
  <pre><code>$nids = \Drupal::entityQuery('node')
              -&gt;condition('type','page')
              -&gt;condition('status',1)
              -&gt;sort('created', 'DESC')
              -&gt;range(0, 20)
              -&gt;execute();
  </code></pre>
  <p>But I want to know how I can implement an additional condition to filter nodes by a part of the URL alias for example &quot;/news/*&quot;. I need all nodes with this url fragment.</p>