This is getting me really annoyed. I bet as soon as the delete function dissapears from here I will find the answer
Basically, I have a URL held in $url. What I want to do is split the www.test.com/something/something/index.html part into www.test.com and /something/something/index.html.
I know how to do the normal regex thing where it would split them up with the /'s, but i need it to split after the domain.
Would the following work?
my ($start, $end) = split(/.com|.net|.co.uk|.edu/, $url);
Any ideas would be appreciated
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Basically, I have a URL held in $url. What I want to do is split the www.test.com/something/something/index.html part into www.test.com and /something/something/index.html.
I know how to do the normal regex thing where it would split them up with the /'s, but i need it to split after the domain.
Would the following work?
my ($start, $end) = split(/.com|.net|.co.uk|.edu/, $url);
Any ideas would be appreciated
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!