I'm new in regular expressions - so, here's my simple question:
I'd like to get the fist part of an URL that contains a query string or a '#':
e.g.
"www.somewhere.com/test/index.php?q=nothing"
"www.somewhere.com/test/index.php#someanchor
"www.somewhere.com/test/index.php"
I do not want to use parse_url() as I wouldn't be able to check for the '#'
thanks
Philip