title: How to parse URL with # in Swift?
body: <p>Suppose, I have following URL: <code>https://something.com/room/order/12345555/product/543333?is_correct=true</code>. It is kind of deeplink and I should parse its parameters and show some ViewController. I am interested in values as 12345555, 543333 and true. Actually, it is easy to get those parameters.</p>
  <p>In order to get 12345555 or 543333, we can use <code>pathComponents</code> of URL which returns <code>[&quot;/&quot;, &quot;room&quot;, &quot;order&quot;, &quot;12345555&quot;, &quot;product&quot;, &quot;543333&quot;]</code>. To get query items (is_correct: true), we can use URLComponents. Everything is clear and simple.</p>
  <p>But suppose my link contains <code>#</code> as path <code>https://something.com/room/#/order/12345555/product/543333?is_correct=true</code>. Now, for this link, <code>pathComponents</code> returns just <code>[&quot;/&quot;, &quot;room&quot;]</code> ignoring everything else. Of course, there are also problems with query parameters.</p>
  <p>Why does <code>#</code> symbol affect so? How can I solve problem? Should I just replace <code>#</code> with something or <code>URL</code> from Swift contains some helper methods? Thanks.</p>