realbasic-nug
[Top] [All Lists]

Re: finding links with RegEx?

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: finding links with RegEx?
From: Jerry Hamlet <jerry at hamletzone dot com>
Date: Wed, 27 Feb 2002 15:05:40 -0800
On 2/27/02 2:35 PM, "Thomas Reed" <thomasareed at earthlink dot net> wrote:

> Does anyone have an example of how to find links in HTML files using
> RegEx?  I'm not all that knowledgeable in regular expressions, and I'm
> curious about whether someone else has already invented this particular
> wheel...
> 
> Note that I need to find any kind of link to an external file -- such as
> <A HREF="link">, <IMG SRC="link">, <BODY BACKGROUND="link">, etc.  And I
> need to be able to quickly and easily isolate the "link" text.
> 
> Thanks in advance!

Off the top of my head:

(src|background|href)="?([^\s"]+)[\s"]

-jerry

+---------------------------+
| Jerry Hamlet              |
| Web Designer/Programmer   |
| www.hamletzone.com        |
| jerry at hamletzone dot com      |
+---------------------------+





<Prev in Thread] Current Thread [Next in Thread>