| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Jun 2005
Posts: 518
![]() ![]() | RegEx Help Hey there... ????: NamePros.com http://www.namepros.com/programming/193686-regex-help.html Im trying to make a regex query that will strip down all the non-relevant HTML to leave just the hyperlink info. An example of the hyperlink HTML is... HTML Code: <a href="http://www.url.com/blah.htm" class=underline><b>Vist My Page</b></a> Obviously the link changes as there are alot in the actual HTML of the page... as does the text for it, but theyre always inbetween the bold tags. So far I think ive got the URL by using: http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)? But Im not 100% sure on how to get the text of the link along with it. Any help would be greatly appreciated ![]() If it makes any difference im planning on using this with .net
__________________ Free Horse Racing Tips |
| |
| | #2 (permalink) |
| Senior Member Join Date: Nov 2005 Location: on a oil rig just off Ireland
Posts: 1,408
![]() ![]() ![]() ![]() ![]() | Perhaps this might be useful to you. PHP Code:
__________________ You design in photoshop, I code into valid XHTML/CSS. Professional PSD, PNG or HTML to tableless XHTML/CSS designs. For more info, send me a PM. |
| |