forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Extract URL/email address from a string
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Apr 07, 2004 7:37 pm    Post subject: Reply with quote

Does anyone know how to make something that would work for both
the following ways a URL is found in HTML source code?

Code:
<a href="http://freezingfire.vdsworld.com">test</a>
<a href=http://freezingfire.vdsworld.com>test</a>

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1567

PostPosted: Wed Apr 07, 2004 9:29 pm    Post subject: Reply with quote

Why not search for the string http://, start parsing from that POSition and get the substring up till it finds a " or >. You may also want to use the TRIM function afterward in case there were any extra spaces in between which will be removed out.
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Apr 07, 2004 10:19 pm    Post subject: Reply with quote

Good idea. Very Happy

I didn't think of that. I'm making a site crawler, I'll probably share it when
it's done. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Thu Apr 08, 2004 2:38 pm    Post subject: Reply with quote

If you make a site crawler, please note that there are a lot of links which only display "pagename.html" for example. I think it's better in this case to search for "<a href=", and to check if that will start with http:// or not... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Apr 08, 2004 4:37 pm    Post subject: Reply with quote

True. Smile
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group