MACSCRPT Archives

July 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 30 Jul 2007 13:33:08 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
Emmanuel wrote:

>> I have a regex question, using the Satimage osax.
>>
>> I am trying to ignore lines that end with the following:
>>
>> \tAAA\t
>
> With Satimage osax, I'm afraid your hack is the good solution.
>
> In Smile, you have look-ahead and look-behind assertions, so you can
> write like:
>
> ufind text "(?<!\\tAAA)\\t" etc.

Yep, a negative lookbehind assertion is the best way to go, though  
they're the sort of feature that only appear in more advanced regular  
expression engines. Smile is one such option; another is TextCommands  
<http://osaxen.com/files/textcommands1.1.2.html>; a third is to call  
Perl via 'do shell script'.

HTH

has
-- 
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html

ATOM RSS1 RSS2