re: regex
Subject : re: regex
From: tom wible <email@hidden >
Date: Sun, 04 Mar 2007 16:35:45 -0500
Delivered-to: email@hidden
Delivered-to: email@hidden
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.