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

re: regex


  • Subject: re: regex
  • From: tom wible <email@hidden>
  • Date: Sun, 04 Mar 2007 16:35:45 -0500

Cameron Hayne:
Sample AppleScript code:
-------------------------------
set theAnswer to the string matched by the regular expression "^/\s* ([^:]*):\s*$" when applied to theLine
-------------------------------

kool...never saw that in apple's docs;-}

the above doesn't compile, but a quick google on that syntax found this @ http://www.satimage.fr/software/en/reg_exp_syntax.html

   find text "(.+) (.+)" in "Mickey Mouse" using {"Dest: Mr \\2", "Dear \\1,"}
      with regexp and string result

> {"Dest: Mr Mouse", "Dear Mickey,"}

but the
_______________________________________________
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: Re: Print to PDF
  • Next by Date: InDesign Scripting - Getting Links of Active Spread
  • Previous by thread: Re: LogoutHook not working
  • Next by thread: InDesign Scripting - Getting Links of Active Spread
  • Index(es):
    • Date
    • Thread