Re: Simple text question
Re: Simple text question
- Subject: Re: Simple text question
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 7 Jul 2008 17:11:38 -0400
On Mon, Jul 7, 2008 at 5:06 PM, Michelle Steiner <email@hidden> wrote:
>> set a to "gibberish 123430[Foobazoo]this is test (#1)."
>
> But is the number 3430, 430, 30, or 0?
Well, they can't all be allowed; right now the algorithm is greedy and
takes as many digits as it can.
In order for this to be a tractable problem, the pattern needs to be
either of the following:
anything ending in a non-digit, followed by any number
of digits, followed by bracketed text
or
anything, including digits, followed by at most four
digits, followed by bracketed text
In the second case one further needs to specify how to determine where
numeric gibberish stops and the desired number starts.
>
> And is the gibberish the corresponding "gibberish 12", "gibberish 123",
> "gibberish 1234", or "gibberish 12343"?
>
> -- Michelle
>
> --
> "As a matter of general principle, I believe there can be no doubt that
> criticism in time of war is essential to the maintenance of any kind of
> democratic government ... too many people desire to suppress criticism
> simply because they think that it will give some comfort to the enemy to
> know that there is such criticism." -- Robert A. Taft, December 19, 1941
>
>
> _______________________________________________
> 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
>
--
Mark J. Reed <email@hidden>
_______________________________________________
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