Re: RegEx Commands
Re: RegEx Commands
- Subject: Re: RegEx Commands
- From: JollyRoger <email@hidden>
- Date: Mon, 06 Aug 2001 14:53:49 -0500
On 8/6/2001 12:30 PM, "Greg Strange" <email@hidden> wrote:
>
I couldn't help golfing this one.
Whatever floats your boat.
>
--begin script
>
>
set someString to "ignore this
>
ignore this
>
ignore this
>
%AI5_BeginRaster
>
(Mac HD:Desktop Folder:Bear.tif) 0 XG
>
ignore this
>
ignore this"
>
>
set {saveDelims, AppleScript's text item delimiters} to {AppleScript's text
>
item delimiters, ("%AI5_BeginRaster" & return & "(")}
>
>
set itemList to text items of someString
>
set AppleScript's text item delimiters to ")"
>
set thePic to item 1 of (text items of item 2 of itemList)
>
>
log thePic
>
>
--end script
You forgot to restore the text item delimiters. Add a line for that. ;^)
>
Four lines to your nine. Sorry my competitive nature must be just under the
>
surface today.
This isn't a competition, Greg. I never said my script was as efficient as
it could be. I left that as an exercise to the reader.