>Off the top of my head:
>
>(src|background|href)="?([^\s"]+)[\s"]
This works, and seems to work well, except for a couple things.
First, it doesn't handle line breaks well. For example, suppose there's
a break like this:
................................ SRC =
"somelink.html" ...
This would be skipped, but I need to match it. (Handling returns has
always been a problem for me in regular expressions before.)
Second, I want to make sure this only matches if the text in question is
somewhere inside a pair of angle brackets.
For example, I don't want to match the link in a case like this:
<P>To display a link on your web page, do the following:</P>
<P><A HREF="samplelink.html"></P>
How can I extend this to handle these two conditions?
-Thomas
Personal web page: http://home.earthlink.net/~thomasareed/
My shareware: http://home.earthlink.net/~thomasareed/shareware/
Pixel Pen web pub. guide: http://home.earthlink.net/~thomasareed/pixelpen/
The bus station is the place where the bus stops. The train station is the
place where the train stops. So if I have a workstation...
|