I am fairly new to regex, and I am having a bit of a problem. I want the content in the url between the `/` and `?` or `/` and `/`.

Example:

`www.domain.com/about?page/readmore/party`

The values that I want:

`about`
`page`
`readmore`
`party`

How can I achieve this? Tried to do it with `preg_split` but could not achieve it.