• 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
Satimage: non-greedy regexp matching?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Satimage: non-greedy regexp matching?


  • Subject: Satimage: non-greedy regexp matching?
  • From: Wim Melis <email@hidden>
  • Date: Mon, 20 Dec 2004 19:38:37 +0100

I'm trying to get a regexp match using the Satimage addition, looking for
the complete <A...>...</A> blocks in an HTML page.

Unfortunately the match is always 'greedy', ie:

set theHTML to
"<a href=\"file1.html\">link1</a> test <a href=\"file2.html\">link2</a>"

set x to find text "<a href=.*</a>" in theHTML with regexp, string result
and all occurrences

This results in one match, being the entire string, not in two separate
matches. The 'link' part in the string could also be an image, so [^<]*
instead of .* won't work.
(And the usual regex .*? construct doesn't seem to be supported.)

Is this possible somehow, or does the Satimage addition only support greedy
matches?

Thanks,
Wim

--
email (home): email@hidden
email (office): email@hidden
http://www.noorderlicht.com * Noorderlicht photofestival


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Satimage: non-greedy regexp matching?
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Stop a script at a certain time?
  • Next by Date: Re: Satimage: non-greedy regexp matching?
  • Previous by thread: Re: Stop a script at a certain time?
  • Next by thread: Re: Satimage: non-greedy regexp matching?
  • Index(es):
    • Date
    • Thread