• 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 Regex
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Satimage Regex


  • Subject: Re: Satimage Regex
  • From: has <email@hidden>
  • Date: Sun, 20 Nov 2005 22:41:41 +0000

Michael Ghilissen wrote:

>I can't resolve this. I need to extract the text between ">Cover<" and the first "<br><br>" in a text string that contains several "<br><br>".

TextCommands' regex support allows non-greedy matching:

set theText to "abcd >Cover< efgh <br><br> ijkl <br><br> mnop <br><br>"
tell application "TextCommands"
	set theResult to search theText for ">Cover<(.*?)<br><br>" expanding to "\\1" with regex
end tell

See: <http://freespace.virgin.net/hamish.sanderson/#textcommands>

HTH

has
--
http://freespace.virgin.net/hamish.sanderson/
 _______________________________________________
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 Regex
      • From: Michael Ghilissen <email@hidden>
  • Prev by Date: Re: Safari source code
  • Next by Date: Re: Safari source code
  • Previous by thread: Satimage Regex
  • Next by thread: Re: Satimage Regex
  • Index(es):
    • Date
    • Thread