SatImage regexp problem
SatImage regexp problem
- Subject: SatImage regexp problem
- From: Brennan <email@hidden>
- Date: Sat, 11 Oct 2008 14:09:36 +0200
Hi,
I'm trying to extract a bunch of image links from some (generated and
well-formed) html code. I am only interested in the src parameter of a
tags.
In Smile, I was able to get a working regexp in the Find dialog, namely:
<a href="[^ ]*
When I use this in my AppleScript (escaping the ", of course), it tells me
that no result was returned. i.e.:
set txt to return & "<a
href='http://www.vegetables.com/2008/09/rhubarb.jpg'>rhubarb</a>"
set searchTerm to "href=[\"'][^ ]* "
find text searchTerm in txt with all occurrences without case sensitive
My thinking in the regexp is:
Literal href= followed by either " or ', followed by any number of
characters which are not spaces, followed by a space. What am I doing
wrong?
Alternatively, if anyone has a nice AppleScript way of extracting urls
from html, please let me know, thanks!
--
Brennan Young
"A hen is only an egg's way of making another egg."
- Samuel Butler
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden