rgb192
asked on
parse url
Parse and store anchor portion of URL. HTTP://website.com/folder/folder/page.php?car=Ford&size=compact#top
ASKER
Doesn't work
I am using php 5.3.3 in Ubuntu linux. Works in a browser and on the command line.
Did it not return anything or did it return something that was not what you expected.
Did it not return anything or did it return something that was not what you expected.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Of the supplied URL which part do you want to access:
HTTP://website.com/folder/folder/page.php?car=Ford&size=compact#top
HTTP://website.com/folder/folder/page.php?car=Ford&size=compact#top
ASKER
thanks
^ match start of string
( I want the portion in brackets returned to me
.* anything
\/\/ then two slashes //
[^\/]* anything that is not a slash
) end of the part I want returned
\/ then a slash
returns: HTTP://website.com
Open in new window