title: Split url function in twig drupal
body: <p>In twig file , i have used statement like this:<br>
      <code>{% set foo = url|split('/') %}</code> 
  But when i use this code nothing happens.  </p>
  
  <pre><code>{{foo[1]}}
  </code></pre>
  
  <p>However if i use this statement  <code>{{URL}}</code>  , i have a result.<br>
  <a href="http://example.com/my-completion/8631" rel="nofollow noreferrer">http://example.com/my-completion/8631</a></p>
  
  <p>I want to get "8631" using URL split<br>
  I do not know why it does not work.<br>
  Thank you for help.</p>