By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,244 Members | 1,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,244 IT Pros & Developers. It's quick & easy.

Extract http:// from url

P: 1
hello !!

I want to extract a url from another url ... for example :

... /http://www.google.com/ .... but this donīt work with .../(.*)/.... because "//" matches to "/" and I extract this => http:/www.google.com and itīs wrong.

Any Idea?? thanks !!
Apr 2 '08 #1
Share this Question
Share on Google+
2 Replies


Ganon11
Expert 2.5K+
P: 3,652
Maybe you could match for "/http:\/\/(.*)/"?
Apr 2 '08 #2

P: 6
hello !!

I want to extract a url from another url ... for example :

... /http://www.google.com/ .... but this donīt work with .../(.*)/.... because "//" matches to "/" and I extract this => http:/www.google.com and itīs wrong.

Any Idea?? thanks !!

I think maybe you can use "#(.*)#" except "/" to match.
Apr 7 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.