Subject: | |
From: | |
Reply To: | |
Date: | Wed, 7 Jun 2006 14:12:56 +0200 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
At 10:10 PM +1300 6/7/06, Joe Barwell wrote:
>Secondly, I find Satimage osax's behaviour unpredictable as regards
>escaped characters. For example, "\\r" or "\\t" often seem to be
>being treated as literals, instead of escaped special characters, but
>I can't find a logical pattern as to where their use is
>recognized/not.
Maybe what is confusing you is that when used "with regexp" the osax
follows the Regular Expressions syntax, while when used without
regexp the osax follows AppleScript's rules only.
Also, another thing which can yield confusion is that, *inside
quotes*, you can write \r and AppleScript understands return. Look.
this will work:
----------------
find text "\r" in "hello
world"
----------------
this will work:
----------------
find text "\r" in "hello
world" with regexp
----------------
this will work:
----------------
find text "\\r" in "hello
world" with regexp
----------------
this will not work, because "hello world" does not contain a
backslash followed with r:
----------------
find text "\\r" in "hello
world"
----------------
Now, Joe, maybe you would be able to provide us with a more specific
unwanted behavior.
Emmanuel
|
|
|