• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SatImage regexp problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SatImage regexp problem


  • Subject: Re: SatImage regexp problem
  • From: "Joel Esler" <email@hidden>
  • Date: Sat, 11 Oct 2008 08:29:59 -0400

Will this work for you?

/<a\s+href="">
Just a thought.

J

On Sat, Oct 11, 2008 at 8:09 AM, Brennan <email@hidden> wrote:
>
> 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="" href="http://www.vegetables.com/2008/09/rhubarb.jpg">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= "" 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.
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden



--
Joel Esler
  Cell: 706-231-1451
  iChat:  eslerjoel
[m]
 _______________________________________________
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

  • Prev by Date: SatImage regexp problem
  • Next by Date: Re: SatImage regexp problem
  • Previous by thread: Re: SatImage regexp problem
  • Next by thread: Creating a new rule in Entourage2008
  • Index(es):
    • Date
    • Thread