0

Check if third paramter contain #value. e.g https://example.com/gallery/latest#2023 Now I want to check that third parameter (latest#2023) having # and want to get value after # which is 2023

mplungjan
  • 169,008
  • 28
  • 173
  • 236
  • `#` denotes a URL fragment and is not a valid URL character otherwise. – VLAZ Aug 21 '23 at 08:32
  • But it should be on 3rd place too – Rahul Dravid Aug 21 '23 at 08:38
  • 1
    It doesn't matter in which "place" it is. Anything after `#` is part of the fragment. A URL of the form `url.com/one/two#whatever/three` doesn't mean "there is a path with three segments, which are `one`, `two#whatever`, and `three`". It only means "there are two segments `one` and `two`". It will only fetch the path `url.com/one/two` because `#whatever/three` is the fragment. – VLAZ Aug 21 '23 at 08:49
  • 1
    This MDN article may be worth reading: [MDN: Anatomy of a URL](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#basics_anatomy_of_a_url) – DBS Aug 21 '23 at 09:01

0 Answers0