Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Finding URLs in a PHP String
Old 05-11-2008, 01:33 AM Finding URLs in a PHP String
Novice Talker

Posts: 12
Trades: 0
I'm looking for a way to work out the number of urls within a PHP string for example


PHP Code:
Please find my website at <a href="mydomain1.com">My Domain</a> and <a href="mydomain2.com">My Domain 2</a>

Would return that there was two urls included within the php string, I've thought of using substr_count but I cant see anyway of making that work.

Can anyone offer any help

Thanks
feelice is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-11-2008, 03:37 AM Re: Finding URLs in a PHP String
addonchat's Avatar
Super Talker

Posts: 115
Name: Chris Duerr
Trades: 0
You've made quite a few of posts concerning parsing/matching data. I suggest doing some research on regular expressions. Here are some references for you:

http://www.webcheatsheet.com/php/reg...xpressions.php
http://www.regular-expressions.info/
http://www.regular-expressions.info/php.html
http://us3.php.net/manual/en/book.pcre.php
http://us3.php.net/manual/en/book.regex.php
__________________
Chris Duerr
AddonChat Java Chat Software

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
addonchat is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Finding URLs in a PHP String
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.47696 seconds with 12 queries